Skip to content

Commit

Permalink
Merge pull request #205 from skalenetwork/add-delegation-ui
Browse files Browse the repository at this point in the history
Staking UI - escrow, grants, delegation actions and summary
  • Loading branch information
dmytrotkk authored Apr 5, 2024
2 parents 1bf4f55 + 2dcdca7 commit 26f7db9
Show file tree
Hide file tree
Showing 149 changed files with 4,790 additions and 409 deletions.
13 changes: 8 additions & 5 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ module.exports = {
extends: [
'plugin:react/recommended',
'standard-with-typescript',
'prettier',
'plugin:storybook/recommended'
'prettier'
],
overrides: [],
overrides: [{
files: ['*.jsx', '*.tsx'],
rules: {
'@typescript-eslint/explicit-function-return-type': ['off'],
},
}],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
Expand All @@ -18,8 +22,7 @@ module.exports = {
rules: {
'react/jsx-key': 'off',
'react/react-in-jsx-scope': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'no-console': 'warn',
'@typescript-eslint/triple-slash-reference': 'off'
},
}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ yarn-error.log*
.env
src/data/metaportConfig*.ts
src/meta/
src/assets/validators/index.ts

src/metadata/chainsData.json
src/metadata/faucet.json
.vercel

chainsJson.json

public/sitemap.xml
public/robots.txt
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ else
fi

node generate-imports.cjs ./src/meta/logos
node generate-imports.cjs ./src/assets/validators

bash generate_sitemap.sh

echo "Building..."
yarn build
bun run build
Binary file modified bun.lockb
Binary file not shown.
108 changes: 25 additions & 83 deletions config/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export const METAPORT_CONFIG: interfaces.MetaportConfig = {
debug: false,
chains: [
'mainnet',
'skale-innocent-nasty', // europa
'international-villainous-zaurak', // calypso
'big-majestic-oval-SKALE' // qa chain
'these-long-sadalsuud', // europa
'adorable-quaint-bellatrix', // nebula
'spanish-smug-auva' // calypso
],
tokens: {
eth: {
Expand All @@ -19,76 +19,48 @@ export const METAPORT_CONFIG: interfaces.MetaportConfig = {
decimals: '18',
name: 'SKALE',
symbol: 'SKL'
},
usdc: {
decimals: '6',
symbol: 'USDC',
name: 'USD Coin'
},
trt: {
decimals: '18',
symbol: 'TRT',
name: 'Turtle Coin',
iconUrl: 'https://github.com/microsoft/fluentui-emoji/blob/main/assets/Turtle/3D/turtle_3d.png?raw=true'
}
},
connections: {
mainnet: {
eth: {
eth: {
chains: {
'skale-innocent-nasty': {},
'international-villainous-zaurak': {
hub: 'skale-innocent-nasty'
'these-long-sadalsuud': {},
'adorable-quaint-bellatrix': {
hub: 'these-long-sadalsuud'
}
}
}
},
erc20: {
skl: {
address: '0x17A7Cf31a11554e75246973663262dA56F84F89b',
address: '0x0E53fDa415cc6b2a7D9495D4a1F0659F0Ee45e0d',
chains: {
'skale-innocent-nasty': {},
'international-villainous-zaurak': {
hub: 'skale-innocent-nasty'
'these-long-sadalsuud': {},
'adorable-quaint-bellatrix': {
hub: 'these-long-sadalsuud'
}
}
},
// usdc: {
// address: '0x85dedAA65D33210E15911Da5E9dc29F5C93a50A9',
// chains: {
// 'skale-innocent-nasty': {},
// 'international-villainous-zaurak': {
// hub: 'skale-innocent-nasty'
// }
// }
// }
}
}
},
'big-majestic-oval-SKALE': {
'spanish-smug-auva': {
erc20: {
trt: {
address: '0xbb2c9411079c6ddcd19c74e8442f77b70ae74267',
chains: {
'international-villainous-zaurak': {
clone: true
}
}
}
}
},
'international-villainous-zaurak': {
// Calypso connections
'adorable-quaint-bellatrix': {
// Nebula connections
eth: {
eth: {
address: '0x9C0e8bC2B2D403299214c80081F93fAB5e10b593',
chains: {
'skale-innocent-nasty': {
'these-long-sadalsuud': {
clone: true
},
mainnet: {
clone: true,
hub: 'skale-innocent-nasty'
hub: 'these-long-sadalsuud'
}
}
}
Expand All @@ -97,37 +69,18 @@ export const METAPORT_CONFIG: interfaces.MetaportConfig = {
skl: {
address: '0xFbbDF9aC97093b1E88aB79F7D0c296d9cc5eD0d0',
chains: {
'skale-innocent-nasty': {
'these-long-sadalsuud': {
clone: true
},
mainnet: {
hub: 'skale-innocent-nasty',
hub: 'these-long-sadalsuud',
clone: true
}
}
},
trt: {
address: '0x45f7ca2ace063867e8e1378f0f2cfa86d8f591de',
chains: {
'big-majestic-oval-SKALE': {}
}
}

// usdc: {
// address: '0x49c37d0Bb6238933eEe2157e9Df417fd62723fF6',
// chains: {
// 'skale-innocent-nasty': {
// clone: true
// },
// mainnet: {
// hub: 'skale-innocent-nasty',
// clone: true
// }
// }
// }
}
},
'skale-innocent-nasty': {
'these-long-sadalsuud': {
// Europa connections
eth: {
eth: {
Expand All @@ -136,35 +89,24 @@ export const METAPORT_CONFIG: interfaces.MetaportConfig = {
mainnet: {
clone: true
},
'international-villainous-zaurak': {
wrapper: '0x321e1aa81B4c6CC3B8EFe3D9c0AD67E6eC949c2c'
'adorable-quaint-bellatrix': {
wrapper: '0x3a830008c24300Dd8F469EBFEd13E4854409440D'
}
}
}
},
erc20: {
skl: {
address: '0xa101902B3119f4830292bb79ebAB56967229207B',
address: '0xDeCcD09457Bd23c4CDD3C6E07a00053Ff54869dd',
chains: {
mainnet: {
clone: true
},
'international-villainous-zaurak': {
wrapper: '0x51A1eD016633Afb00C25Eb404745C61D8c16BBd4'
'adorable-quaint-bellatrix': {
wrapper: '0xEc656cc30205479C5DAa3aDac7b4D9d0fe0FDc51'
}
}
},
// usdc: {
// address: '0x5d42495D417fcd9ECf42F3EA8a55FcEf44eD9B33',
// chains: {
// mainnet: {
// clone: true
// },
// 'international-villainous-zaurak': {
// wrapper: '0x4f250cCE5b8B39caA96D1144b9A32E1c6a9f97b0'
// }
// }
// }
}
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion generate-imports.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (!rootDir) {
const getSvgFilesInDir = (dir) => {
return fs.readdirSync(dir).filter(file => {
const ext = path.extname(file);
return ['.png', '.svg', '.gif'].includes(ext);
return ['.png', '.svg', '.gif', '.webp', '.jpeg', '.jpg'].includes(ext);
}).map(file => path.join(dir, file))
};

Expand Down
19 changes: 13 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
{
"name": "portal",
"private": true,
"version": "2.1.1",
"version": "2.2.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint": "eslint ./src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"prettier": "prettier --write \"src/**/*.{ts,tsx,js,mdx}\"",
"version": "node -e \"console.log(require('./package.json').version);\""
},
"dependencies": {
"@mdx-js/rollup": "^2.3.0",
"@mui/icons-material": "^5.14.8",
"@mui/material": "^5.14.5",
"@skalenetwork/metaport": "2.0.3-beta.2",
"@mui/icons-material": "^5.15.14",
"@mui/material": "^5.15.14",
"@skalenetwork/skale-contracts-ethers-v6": "1.0.1-develop.2",
"@skalenetwork/metaport": "2.1.0-develop.2",
"@types/react-copy-to-clipboard": "^5.0.4",
"@vercel/analytics": "^1.0.2",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard-with-typescript": "^39.1.0",
"ethers-multicall-provider": "^6.2.0",
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^18.2.0",
"react-helmet": "^6.1.0",
"react-jazzicon": "^1.0.4",
"react-router-dom": "^6.15.0"
"react-router-dom": "^6.15.0",
"react-transition-group": "^4.4.5"
},
"devDependencies": {
"@types/react": "^18.2.15",
Expand All @@ -37,6 +40,10 @@
"@vitejs/plugin-react": "^4.0.4",
"bun-types": "^1.0.17",
"eslint": "^8.45.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"sass": "^1.65.1",
Expand Down
Binary file modified public/apps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/bridge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/chains.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/portfolio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/staking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/stats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion skale-network
Submodule skale-network updated 30 files
+34 −2 metadata/legacy/chains.json
+4 −0 metadata/legacy/icons/adorable-quaint-bellatrix-cryptocrusades.svg
+4 −0 metadata/legacy/icons/adorable-quaint-bellatrix-motodex.svg
+9 −0 metadata/legacy/icons/adorable-quaint-bellatrix-nftb.svg
+26 −0 metadata/legacy/icons/adorable-quaint-bellatrix.svg
+0 −0 metadata/legacy/icons/spanish-smug-auva-clet-domains.svg
+0 −0 metadata/legacy/icons/spanish-smug-auva-nftrade.svg
+0 −0 metadata/legacy/icons/spanish-smug-auva-untitled-platformer.svg
+0 −0 metadata/legacy/icons/spanish-smug-auva-xp-network.svg
+0 −0 metadata/legacy/icons/spanish-smug-auva.svg
+0 −0 metadata/legacy/icons/these-long-sadalsuud-ruby.svg
+0 −0 metadata/legacy/icons/these-long-sadalsuud.svg
+ metadata/legacy/logos/adorable-quaint-bellatrix.png
+ metadata/legacy/logos/spanish-smug-auva.png
+ metadata/legacy/logos/these-long-sadalsuud.png
+56 −1 metadata/mainnet/chains.json
+174 −0 metadata/mainnet/icons/green-giddy-denebola-bit-hotel.svg
+290 −0 metadata/mainnet/icons/green-giddy-denebola-dex-go.svg
+197 −0 metadata/mainnet/icons/green-giddy-denebola-fivetars.svg
+16 −0 metadata/mainnet/icons/green-giddy-denebola-heavens-compass.svg
+34 −0 metadata/mainnet/icons/green-giddy-denebola-jump-trade.svg
+17 −0 metadata/mainnet/icons/honorable-steel-rasalhague-dmail.svg
+34 −0 metadata/mainnet/icons/honorable-steel-rasalhague-dripverse.svg
+90 −0 metadata/mainnet/icons/honorable-steel-rasalhague-pixudi.svg
+17,359 −0 releases/mainnet/skale-manager/1.10.0/skale-manager-1.10.0-mainnet-abi.json
+27 −0 releases/mainnet/skale-manager/1.10.0/skale-manager-1.10.0-mainnet-contracts.json
+1,859 −0 releases/staging/ima-contracts/1.5.0/mainnet/manifest.json
+11,096 −0 releases/staging/skale-manager/1.10.0/manifest.json
+15,455 −0 releases/staging/skale-manager/1.10.0/skale-manager-1.10.0-beta.0-custom-abi.json
+5,799 −0 releases/staging/skale-manager/1.9.4/manifest.json
Loading

0 comments on commit 26f7db9

Please sign in to comment.