+
{{ stakeButtonText }}
@/composables/user@/composables/staking
\ No newline at end of file
diff --git a/common/env/src/index.ts b/common/env/src/index.ts
index d1285b296..d2dcbca3a 100644
--- a/common/env/src/index.ts
+++ b/common/env/src/index.ts
@@ -39,6 +39,10 @@ enum ETHEREUM_RPC_URL {
TESTNET = "https://goerli.infura.io/v3/46a379ac6895489f812f33beb726b03b" // 'https://nodes.casimir.co/eth/goerli/limited'
}
+enum ETHEREUM_WS_URL {
+ TESTNET = "wss://goerli.infura.io/ws/v3/46a379ac6895489f812f33beb726b03b"
+}
+
const ETHEREUM_SIGNERS = {
TESTNET: {
DAO_ORACLE_ADDRESS: "0x728474D29c2F81eb17a669a7582A2C17f1042b57",
@@ -57,6 +61,7 @@ export {
ETHEREUM_CONTRACTS,
ETHEREUM_NETWORK_NAME,
ETHEREUM_RPC_URL,
+ ETHEREUM_WS_URL,
ETHEREUM_SIGNERS,
HARDHAT_NETWORK_KEY
}
diff --git a/common/types/src/index.ts b/common/types/src/index.ts
index 87e4568fd..cca491fd9 100644
--- a/common/types/src/index.ts
+++ b/common/types/src/index.ts
@@ -30,6 +30,7 @@ import { PoolStatus } from "./interfaces/PoolStatus"
import { ProviderString } from "./interfaces/ProviderString"
import { SignInWithEthereumCredentials } from "./interfaces/SignInWithEthereumCredentials"
import { SSVOperator } from "./interfaces/SSVOperator"
+import { StakeDetails } from "./interfaces/StakeDetails"
import { TransactionRequest } from "./interfaces/TransactionRequest"
import { RegisteredOperator } from "./interfaces/RegisteredOperator"
import { RegisterOperatorWithCasimirParams } from "./interfaces/RegisterOperatorWithCasimirParams"
@@ -74,6 +75,7 @@ export type {
ProviderString,
SignInWithEthereumCredentials,
SSVOperator,
+ StakeDetails,
TransactionRequest,
RegisteredOperator,
RegisterOperatorWithCasimirParams,
diff --git a/common/types/src/interfaces/StakeDetails.ts b/common/types/src/interfaces/StakeDetails.ts
new file mode 100644
index 000000000..9140bfb35
--- /dev/null
+++ b/common/types/src/interfaces/StakeDetails.ts
@@ -0,0 +1,6 @@
+export interface StakeDetails {
+ operatorType: "Default" | "Eigen",
+ address: string,
+ amountStaked: number,
+ availableToWithdraw: number
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index e7980f031..2d6a6798a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8736,6 +8736,8 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
"integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
+ "dev": true,
+ "peer": true,
"engines": {
"node": ">=8"
}
@@ -9337,7 +9339,8 @@
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
},
"node_modules/base-x": {
"version": "3.0.9",
@@ -9814,6 +9817,7 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -10229,6 +10233,7 @@
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz",
"integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==",
+ "dev": true,
"engines": {
"node": ">= 0.8.0"
}
@@ -10986,7 +10991,8 @@
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
},
"node_modules/concat-stream": {
"version": "1.6.2",
@@ -14661,6 +14667,7 @@
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
"integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
+ "dev": true,
"dependencies": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
@@ -16033,6 +16040,7 @@
"version": "5.2.4",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
"integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
+ "dev": true,
"engines": {
"node": ">= 4"
}
@@ -17780,6 +17788,8 @@
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz",
"integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==",
+ "dev": true,
+ "peer": true,
"engines": {
"node": "*"
}
@@ -18513,7 +18523,9 @@
"node_modules/lodash.truncate": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz",
- "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw=="
+ "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==",
+ "dev": true,
+ "peer": true
},
"node_modules/lodash.uniqby": {
"version": "4.7.0",
@@ -19515,6 +19527,7 @@
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
},
@@ -22463,6 +22476,7 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "dev": true,
"engines": {
"node": ">=0.10.0"
}
@@ -24746,6 +24760,8 @@
"version": "6.8.1",
"resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz",
"integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==",
+ "dev": true,
+ "peer": true,
"dependencies": {
"ajv": "^8.0.1",
"lodash.truncate": "^4.4.2",
@@ -24794,6 +24810,8 @@
"version": "8.12.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
"integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
+ "dev": true,
+ "peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"json-schema-traverse": "^1.0.0",
@@ -24809,6 +24827,8 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true,
+ "peer": true,
"engines": {
"node": ">=8"
}
@@ -24816,12 +24836,16 @@
"node_modules/table/node_modules/json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
- "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true,
+ "peer": true
},
"node_modules/table/node_modules/slice-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
"integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
+ "dev": true,
+ "peer": true,
"dependencies": {
"ansi-styles": "^4.0.0",
"astral-regex": "^2.0.0",
@@ -27764,6 +27788,7 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz",
"integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==",
+ "dev": true,
"engines": {
"node": ">= 14"
}
diff --git a/scripts/cdk/deploy.ts b/scripts/cdk/deploy.ts
index 0e3668b46..47ab60f70 100755
--- a/scripts/cdk/deploy.ts
+++ b/scripts/cdk/deploy.ts
@@ -1,5 +1,5 @@
import { getSecret, loadCredentials } from "@casimir/aws"
-import { ETHEREUM_CONTRACTS, ETHEREUM_RPC_URL } from "@casimir/env"
+import { ETHEREUM_CONTRACTS, ETHEREUM_RPC_URL, ETHEREUM_WS_URL } from "@casimir/env"
import { run } from "@casimir/shell"
/**
@@ -23,6 +23,7 @@ void async function () {
const networkKey = process.env.NETWORK?.toUpperCase() || process.env.FORK?.toUpperCase() || "TESTNET"
process.env.ETHEREUM_RPC_URL = ETHEREUM_RPC_URL[networkKey]
+ process.env.ETHEREUM_WS_URL = ETHEREUM_WS_URL[networkKey]
process.env.FACTORY_ADDRESS = ETHEREUM_CONTRACTS[networkKey]?.FACTORY_ADDRESS
process.env.SSV_NETWORK_ADDRESS = ETHEREUM_CONTRACTS[networkKey]?.SSV_NETWORK_ADDRESS
process.env.SSV_VIEWS_ADDRESS = ETHEREUM_CONTRACTS[networkKey]?.SSV_VIEWS_ADDRESS
@@ -34,6 +35,7 @@ void async function () {
process.env.PUBLIC_WEBSITE_URL = process.env.WEBSITE_URL
process.env.PUBLIC_CRYPTO_COMPARE_API_KEY = process.env.CRYPTO_COMPARE_API_KEY
process.env.PUBLIC_ETHEREUM_RPC_URL = process.env.ETHEREUM_RPC_URL
+ process.env.PUBLIC_ETHEREUM_WS_URL = process.env.ETHEREUM_WS_URL
process.env.PUBLIC_FACTORY_ADDRESS = process.env.FACTORY_ADDRESS
process.env.PUBLIC_SSV_NETWORK_ADDRESS = process.env.SSV_NETWORK_ADDRESS
process.env.PUBLIC_SSV_VIEWS_ADDRESS = process.env.SSV_VIEWS_ADDRESS
diff --git a/scripts/root/dev.ts b/scripts/root/dev.ts
index 2c56462dd..9819b2232 100644
--- a/scripts/root/dev.ts
+++ b/scripts/root/dev.ts
@@ -1,6 +1,6 @@
import { ethers } from "ethers"
import { loadCredentials, getSecret } from "@casimir/aws"
-import { ETHEREUM_CONTRACTS, ETHEREUM_NETWORK_NAME, ETHEREUM_RPC_URL } from "@casimir/env"
+import { ETHEREUM_CONTRACTS, ETHEREUM_NETWORK_NAME, ETHEREUM_RPC_URL, ETHEREUM_WS_URL } from "@casimir/env"
import { run, runSync } from "@casimir/shell"
/**
@@ -97,6 +97,7 @@ async function root() {
if (process.env.NETWORK) {
const networkName = ETHEREUM_NETWORK_NAME[networkKey]
process.env.ETHEREUM_RPC_URL = ETHEREUM_RPC_URL[networkKey]
+ process.env.ETHEREUM_WS_URL = ETHEREUM_WS_URL[networkKey]
console.log(`Connecting to ${networkName} network at ${process.env.ETHEREUM_RPC_URL}`)
} else {
const networkName = ETHEREUM_NETWORK_NAME[networkKey]
@@ -121,6 +122,7 @@ async function root() {
process.env.PUBLIC_BLOG_URL = process.env.BLOG_URL
process.env.PUBLIC_USERS_URL = process.env.USERS_URL
process.env.PUBLIC_ETHEREUM_RPC_URL = process.env.ETHEREUM_RPC_URL
+ process.env.PUBLIC_ETHEREUM_WS_URL = process.env.ETHEREUM_WS_URL
process.env.PUBLIC_FACTORY_ADDRESS = process.env.FACTORY_ADDRESS
process.env.PUBLIC_SSV_NETWORK_ADDRESS = process.env.SSV_NETWORK_ADDRESS
process.env.PUBLIC_SSV_VIEWS_ADDRESS = process.env.SSV_VIEWS_ADDRESS