From d1e24abba2772d31bc99d63057de818bda1fa583 Mon Sep 17 00:00:00 2001 From: Guillermo Perez Date: Mon, 15 Jan 2024 15:04:40 +0100 Subject: [PATCH 1/4] Update gfunction deploy The node15 version will be unavailable January 30th 2024 --- .github/actions/deploy-gfunction/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/deploy-gfunction/action.yml b/.github/actions/deploy-gfunction/action.yml index 1f8d271062..4516da73d7 100644 --- a/.github/actions/deploy-gfunction/action.yml +++ b/.github/actions/deploy-gfunction/action.yml @@ -110,7 +110,7 @@ runs: uses: google-github-actions/deploy-cloud-functions@14509ca55199d9348161571e36c48e44f855030d #@v1 with: name: '${{ steps.prepare.outputs.function_name }}' - runtime: 'nodejs16' + runtime: 'nodejs18' region: '${{ inputs.gcloud_region }}' source_dir: '${{ steps.download.outputs.download-path }}' entry_point: '${{ inputs.target }}' From 0ae23e3de98284518ae427a02bba2d2d43ba11ce Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 16 Jan 2024 09:38:33 -0500 Subject: [PATCH 2/4] Update memberlist pure proxy --- onboarding-api/env-vars/development.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onboarding-api/env-vars/development.env b/onboarding-api/env-vars/development.env index 747e8d40ca..9667a8d51a 100644 --- a/onboarding-api/env-vars/development.env +++ b/onboarding-api/env-vars/development.env @@ -1,5 +1,5 @@ REDIRECT_URL=https://app-dev.k-f.dev -MEMBERLIST_ADMIN_PURE_PROXY=kAJ27w29x7gHM75xajP2yXVLjVBaKmmUTxHwgRuCoAcWaoEiz +MEMBERLIST_ADMIN_PURE_PROXY=kAN9JT23mFNjRt7nKHLie3QvhGjyXvRwkobRUixWHcBiFBQ9t COLLATOR_WSS_URL=wss://fullnode.development.cntrfg.com RELAY_WSS_URL=wss://fullnode-relay.development.cntrfg.com INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 From c6781475a31c2dec1f88dba4cb158fbb70b3cbea Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 16 Jan 2024 09:40:35 -0500 Subject: [PATCH 3/4] Fix bug in init proxy script --- onboarding-api/src/controllers/init/initProxies.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onboarding-api/src/controllers/init/initProxies.ts b/onboarding-api/src/controllers/init/initProxies.ts index cd63a56896..aab49390aa 100644 --- a/onboarding-api/src/controllers/init/initProxies.ts +++ b/onboarding-api/src/controllers/init/initProxies.ts @@ -76,7 +76,7 @@ export const initProxiesController = async (req: Request, res: Response) => { Id: pureProxyController.address, }, { ForeignAsset: 1 }, - CurrencyBalance.fromFloat(100000, 12) + CurrencyBalance.fromFloat(100000, 6) ) const proxiedControllerSubmittable = api.tx.proxy.proxy( From b66617e526a21896b338a4564a85b0635c05f7df Mon Sep 17 00:00:00 2001 From: sophian Date: Fri, 19 Jan 2024 12:57:52 -0500 Subject: [PATCH 4/4] Use onfinality rpc instead of infura due to rate limitations --- centrifuge-app/.env-config/.env.altair | 1 + centrifuge-app/.env-config/.env.catalyst | 1 + centrifuge-app/.env-config/.env.demo | 1 + centrifuge-app/.env-config/.env.development | 1 + centrifuge-app/.env-config/.env.example | 1 + centrifuge-app/.env-config/.env.production | 1 + centrifuge-app/declarations.d.ts | 1 + centrifuge-app/src/config.ts | 5 +++-- 8 files changed, 10 insertions(+), 2 deletions(-) diff --git a/centrifuge-app/.env-config/.env.altair b/centrifuge-app/.env-config/.env.altair index 4d033c3a26..407558171b 100644 --- a/centrifuge-app/.env-config/.env.altair +++ b/centrifuge-app/.env-config/.env.altair @@ -13,6 +13,7 @@ REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-altair REACT_APP_SUBSCAN_URL=https://altair.subscan.io REACT_APP_TINLAKE_NETWORK=goerli REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 +REACT_APP_ONFINALITY_KEY='0e1c049f-d876-4e77-a45f-b5afdf5739b2' REACT_APP_WHITELISTED_ACCOUNTS= REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=kALJqPUHFzDR2VkoQYWefPQyzjGzKznNny2smXGQpSf3aMw19 diff --git a/centrifuge-app/.env-config/.env.catalyst b/centrifuge-app/.env-config/.env.catalyst index 4c6691167e..2740da8e60 100644 --- a/centrifuge-app/.env-config/.env.catalyst +++ b/centrifuge-app/.env-config/.env.catalyst @@ -13,6 +13,7 @@ REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-catalyst REACT_APP_SUBSCAN_URL= REACT_APP_TINLAKE_NETWORK=goerli REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 +REACT_APP_ONFINALITY_KEY='0e1c049f-d876-4e77-a45f-b5afdf5739b2' REACT_APP_WHITELISTED_ACCOUNTS= REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=4bo2vNkwZtr2PuqppWwqya6dPC8MzxqZ4kgnAoTZyKo9Kxq8 diff --git a/centrifuge-app/.env-config/.env.demo b/centrifuge-app/.env-config/.env.demo index 6d741430f5..2f820e5921 100644 --- a/centrifuge-app/.env-config/.env.demo +++ b/centrifuge-app/.env-config/.env.demo @@ -12,6 +12,7 @@ REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-demo REACT_APP_SUBSCAN_URL= REACT_APP_TINLAKE_NETWORK=goerli REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 +REACT_APP_ONFINALITY_KEY='0e1c049f-d876-4e77-a45f-b5afdf5739b2' REACT_APP_WHITELISTED_ACCOUNTS= REACT_APP_NETWORK=centrifuge REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json diff --git a/centrifuge-app/.env-config/.env.development b/centrifuge-app/.env-config/.env.development index 26d997a94e..6cb610c57d 100644 --- a/centrifuge-app/.env-config/.env.development +++ b/centrifuge-app/.env-config/.env.development @@ -13,6 +13,7 @@ REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-developm REACT_APP_SUBSCAN_URL=https://centrifuge.subscan.io REACT_APP_TINLAKE_NETWORK=goerli REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 +REACT_APP_ONFINALITY_KEY='0e1c049f-d876-4e77-a45f-b5afdf5739b2' REACT_APP_WHITELISTED_ACCOUNTS= REACT_APP_TINLAKE_SUBGRAPH_URL=https://api.goldsky.com/api/public/project_clhi43ef5g4rw49zwftsvd2ks/subgraphs/main/prod/gn REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json diff --git a/centrifuge-app/.env-config/.env.example b/centrifuge-app/.env-config/.env.example index 25a5cd7d84..28c4ac99fb 100644 --- a/centrifuge-app/.env-config/.env.example +++ b/centrifuge-app/.env-config/.env.example @@ -13,6 +13,7 @@ REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-developm REACT_APP_SUBSCAN_URL= REACT_APP_TINLAKE_NETWORK=goerli REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 +REACT_APP_ONFINALITY_KEY= REACT_APP_WHITELISTED_ACCOUNTS='' REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=kALJqPUHFzDR2VkoQYWefPQyzjGzKznNny2smXGQpSf3aMw19 diff --git a/centrifuge-app/.env-config/.env.production b/centrifuge-app/.env-config/.env.production index b54606859c..ad518086b5 100644 --- a/centrifuge-app/.env-config/.env.production +++ b/centrifuge-app/.env-config/.env.production @@ -13,6 +13,7 @@ REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-centrifu REACT_APP_SUBSCAN_URL=https://centrifuge.subscan.io REACT_APP_TINLAKE_NETWORK=mainnet REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 +REACT_APP_ONFINALITY_KEY='84bb59f4-05cc-440b-8fd4-7917623a90c6' REACT_APP_WHITELISTED_ACCOUNTS='' REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=kALJqPUHFzDR2VkoQYWefPQyzjGzKznNny2smXGQpSf3aMw19 diff --git a/centrifuge-app/declarations.d.ts b/centrifuge-app/declarations.d.ts index 50e2904942..f499a33ebe 100644 --- a/centrifuge-app/declarations.d.ts +++ b/centrifuge-app/declarations.d.ts @@ -15,5 +15,6 @@ interface ImportMetaEnv { REACT_APP_ONBOARDING_API_URL: string REACT_APP_TINLAKE_NETWORK: 'goerli' | 'mainnet' REACT_APP_INFURA_KEY: string + REACT_APP_ONFINALITY_KEY: string REACT_APP_WALLETCONNECT_ID: string } diff --git a/centrifuge-app/src/config.ts b/centrifuge-app/src/config.ts index 769824ae3a..6d63944db7 100644 --- a/centrifuge-app/src/config.ts +++ b/centrifuge-app/src/config.ts @@ -128,16 +128,17 @@ const CENTRIFUGE: EnvironmentConfig = { } const ethNetwork = import.meta.env.REACT_APP_TINLAKE_NETWORK || 'mainnet' +const onfinalityKey = import.meta.env.REACT_APP_ONFINALITY_KEY const goerliConfig = { - rpcUrl: 'https://goerli.infura.io/v3/f9ba987e8cb34418bb53cdbd4d8321b5', + rpcUrl: `https://eth-goerli.api.onfinality.io/rpc?apikey=${onfinalityKey}`, poolRegistryAddress: '0x5ba1e12693dc8f9c48aad8770482f4739beed696', tinlakeUrl: 'https://goerli.staging.tinlake.cntrfg.com/', poolsHash: 'QmQe9NTiVJnVcb4srw6sBpHefhYieubR7v3J8ZriULQ8vB', // TODO: add registry to config and fetch poolHash blockExplorerUrl: 'https://goerli.etherscan.io', } const mainnetConfig = { - rpcUrl: 'https://mainnet.infura.io/v3/ed5e0e19bcbc427cbf8f661736d44516', + rpcUrl: `https://eth.api.onfinality.io/rpc?apikey=${onfinalityKey}`, poolRegistryAddress: '0x5ba1e12693dc8f9c48aad8770482f4739beed696', tinlakeUrl: 'https://tinlake.centrifuge.io', poolsHash: 'QmNvauf8E6TkUiyF1ZgtYtntHz335tCswKp2uhBH1fiui1', // TODO: add registry to config and fetch poolHash