From 6fffd761d2fb550ead1d14686a80b025c2090fa2 Mon Sep 17 00:00:00 2001 From: JP Angelle Date: Wed, 24 Apr 2024 11:52:54 +0100 Subject: [PATCH] chore: migrate to onfinality --- .../workflows/tinlake-ui-deploy-to-dev.yml | 8 ++++---- .../workflows/tinlake-ui-deploy-to-prod.yml | 4 ++-- .../tinlake-ui-deploy-to-staging.yml | 8 ++++---- .github/workflows/tinlake-ui-pull-request.yml | 8 ++++---- tinlake-ui/.env.goerli-example | 4 ++-- tinlake-ui/.env.kovan-example | 19 ------------------- tinlake-ui/.env.mainnet-example | 4 ++-- tinlake-ui/config.ts | 15 ++++----------- tinlake-ui/services/onboard/index.ts | 6 +++--- 9 files changed, 25 insertions(+), 51 deletions(-) delete mode 100644 tinlake-ui/.env.kovan-example diff --git a/.github/workflows/tinlake-ui-deploy-to-dev.yml b/.github/workflows/tinlake-ui-deploy-to-dev.yml index c4bec5212..286078f06 100644 --- a/.github/workflows/tinlake-ui-deploy-to-dev.yml +++ b/.github/workflows/tinlake-ui-deploy-to-dev.yml @@ -57,7 +57,7 @@ jobs: NEXT_PUBLIC_ENV: 'demo' NEXT_PUBLIC_ETHERSCAN_URL: 'https://goerli.etherscan.io' NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING: '0x5ca22a7cD0911c0b8279faEC3F3273AE94692E34,0xdA709C17ac67fA92d6cF6E92370809694fa9714a' - NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} + NEXT_PUBLIC_ONFINALITY_KEY: 0e1c049f-d876-4e77-a45f-b5afdf5739b2 NEXT_PUBLIC_IPFS_GATEWAY: 'https://cloudflare-ipfs.com/ipfs/' NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS: '0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696' NEXT_PUBLIC_ONBOARD_API_HOST: 'https://onboard-api.catalyst.cntrfg.com/' @@ -67,7 +67,7 @@ jobs: NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmdUg4VgLQg6uDBHxPjiMXoawgPM3LpBzuZr3ejCQTkuet' NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f' NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json' - NEXT_PUBLIC_RPC_URL: 'https://goerli.infura.io/v3/f9ba987e8cb34418bb53cdbd4d8321b5' + NEXT_PUBLIC_RPC_URL: 'https://eth-goerli.api.onfinality.io/rpc?apikey=0e1c049f-d876-4e77-a45f-b5afdf5739b2' NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL: 'https://api.thegraph.com/subgraphs/name/offerijns/tinlake-goerli' NEXT_PUBLIC_TRANSACTION_TIMEOUT: '3600' @@ -133,7 +133,7 @@ jobs: NEXT_PUBLIC_ENV: 'PROD' NEXT_PUBLIC_ETHERSCAN_URL: 'https://etherscan.io' NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING: '0x4B6CA198d257D755A5275648D471FE09931b764A,0xdB3bC9fB1893222d266762e9fF857EB74D75c7D6,0xfc2950dD337ca8496C18dfc0256Fb905A7E7E5c6,0x53b2d22d07E069a3b132BfeaaD275b10273d381E,0x0CED6166873038Ac0cc688e7E6d19E2cBE251Bf0,0x4cA805cE8EcE2E63FfC1F9f8F2731D3F48DF89Df,0x82B8617A16e388256617FeBBa1826093401a3fE5,0x560Ac248ce28972083B718778EEb0dbC2DE55740,0x3d167bd08f762FD391694c67B5e6aF0868c45538,0x3B03863BD553C4CE07eABF2278016533451c9101,0x09e43329552c9D81cF205Fd5f44796fBC40c822e,0xF96F18F2c70b57Ec864cC0C8b828450b82Ff63e3,0xd8486C565098360A24f858088a6D29a380dDF7ec' - NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} + NEXT_PUBLIC_ONFINALITY_KEY: 84bb59f4-05cc-440b-8fd4-7917623a90c6 NEXT_PUBLIC_IPFS_GATEWAY: 'https://cloudflare-ipfs.com/ipfs/' NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441' NEXT_PUBLIC_ONBOARD_API_HOST: 'https://onboard-api.catalyst.cntrfg.com/' @@ -143,7 +143,7 @@ jobs: NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmddkTgX879eV9shYZ6R8MMKM6jjXS7RzpuBNrRt8anC7t' NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f' NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json' - NEXT_PUBLIC_RPC_URL: 'https://mainnet.infura.io/v3/ed5e0e19bcbc427cbf8f661736d44516' + NEXT_PUBLIC_RPC_URL: 'https://eth.api.onfinality.io/rpc?apikey=84bb59f4-05cc-440b-8fd4-7917623a90c6' NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL: 'https://api.goldsky.com/api/public/project_clhi43ef5g4rw49zwftsvd2ks/subgraphs/main/prod/gn' NEXT_PUBLIC_TRANSACTION_TIMEOUT: '3600' diff --git a/.github/workflows/tinlake-ui-deploy-to-prod.yml b/.github/workflows/tinlake-ui-deploy-to-prod.yml index 6fd0e8797..b10ee0e6f 100644 --- a/.github/workflows/tinlake-ui-deploy-to-prod.yml +++ b/.github/workflows/tinlake-ui-deploy-to-prod.yml @@ -53,7 +53,7 @@ jobs: NEXT_PUBLIC_ENV: 'PROD' NEXT_PUBLIC_ETHERSCAN_URL: 'https://etherscan.io' NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING: '0x4B6CA198d257D755A5275648D471FE09931b764A,0xdB3bC9fB1893222d266762e9fF857EB74D75c7D6,0xfc2950dD337ca8496C18dfc0256Fb905A7E7E5c6,0x53b2d22d07E069a3b132BfeaaD275b10273d381E,0x0CED6166873038Ac0cc688e7E6d19E2cBE251Bf0,0x4cA805cE8EcE2E63FfC1F9f8F2731D3F48DF89Df,0x82B8617A16e388256617FeBBa1826093401a3fE5,0x560Ac248ce28972083B718778EEb0dbC2DE55740,0x3d167bd08f762FD391694c67B5e6aF0868c45538,0x3B03863BD553C4CE07eABF2278016533451c9101,0x09e43329552c9D81cF205Fd5f44796fBC40c822e,0xF96F18F2c70b57Ec864cC0C8b828450b82Ff63e3,0xd8486C565098360A24f858088a6D29a380dDF7ec' - NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} + NEXT_PUBLIC_ONFINALITY_KEY: 84bb59f4-05cc-440b-8fd4-7917623a90c6 NEXT_PUBLIC_IPFS_GATEWAY: 'https://cloudflare-ipfs.com/ipfs/' NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441' NEXT_PUBLIC_ONBOARD_API_HOST: 'https://onboard-api.centrifuge.io/' @@ -63,7 +63,7 @@ jobs: NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmddkTgX879eV9shYZ6R8MMKM6jjXS7RzpuBNrRt8anC7t' NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f' NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json' - NEXT_PUBLIC_RPC_URL: 'https://mainnet.infura.io/v3/ed5e0e19bcbc427cbf8f661736d44516' + NEXT_PUBLIC_RPC_URL: 'https://eth.api.onfinality.io/rpc?apikey=84bb59f4-05cc-440b-8fd4-7917623a90c6' NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL: 'https://api.goldsky.com/api/public/project_clhi43ef5g4rw49zwftsvd2ks/subgraphs/main/prod/gn' NEXT_PUBLIC_TRANSACTION_TIMEOUT: '3600' diff --git a/.github/workflows/tinlake-ui-deploy-to-staging.yml b/.github/workflows/tinlake-ui-deploy-to-staging.yml index 6bbab2e98..f98484211 100644 --- a/.github/workflows/tinlake-ui-deploy-to-staging.yml +++ b/.github/workflows/tinlake-ui-deploy-to-staging.yml @@ -53,7 +53,7 @@ jobs: NEXT_PUBLIC_ENV: 'demo' NEXT_PUBLIC_ETHERSCAN_URL: 'https://goerli.etherscan.io' NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING: '0x5ca22a7cD0911c0b8279faEC3F3273AE94692E34,0xdA709C17ac67fA92d6cF6E92370809694fa9714a' - NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} + NEXT_PUBLIC_ONFINALITY_KEY: 0e1c049f-d876-4e77-a45f-b5afdf5739b2 NEXT_PUBLIC_IPFS_GATEWAY: 'https://cloudflare-ipfs.com/ipfs/' NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS: '0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696' NEXT_PUBLIC_ONBOARD_API_HOST: 'https://onboard-api.catalyst.cntrfg.com/' @@ -63,7 +63,7 @@ jobs: NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmdUg4VgLQg6uDBHxPjiMXoawgPM3LpBzuZr3ejCQTkuet' NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f' NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json' - NEXT_PUBLIC_RPC_URL: 'https://goerli.infura.io/v3/f9ba987e8cb34418bb53cdbd4d8321b5' + NEXT_PUBLIC_RPC_URL: 'https://eth-goerli.api.onfinality.io/rpc?apikey=0e1c049f-d876-4e77-a45f-b5afdf5739b2' NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL: 'https://api.thegraph.com/subgraphs/name/offerijns/tinlake-goerli' NEXT_PUBLIC_TRANSACTION_TIMEOUT: '3600' @@ -129,7 +129,7 @@ jobs: NEXT_PUBLIC_ENV: 'PROD' NEXT_PUBLIC_ETHERSCAN_URL: 'https://etherscan.io' NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING: '0x4B6CA198d257D755A5275648D471FE09931b764A,0xdB3bC9fB1893222d266762e9fF857EB74D75c7D6,0xfc2950dD337ca8496C18dfc0256Fb905A7E7E5c6,0x53b2d22d07E069a3b132BfeaaD275b10273d381E,0x0CED6166873038Ac0cc688e7E6d19E2cBE251Bf0,0x4cA805cE8EcE2E63FfC1F9f8F2731D3F48DF89Df,0x82B8617A16e388256617FeBBa1826093401a3fE5,0x560Ac248ce28972083B718778EEb0dbC2DE55740,0x3d167bd08f762FD391694c67B5e6aF0868c45538,0x3B03863BD553C4CE07eABF2278016533451c9101,0x09e43329552c9D81cF205Fd5f44796fBC40c822e,0xF96F18F2c70b57Ec864cC0C8b828450b82Ff63e3,0xd8486C565098360A24f858088a6D29a380dDF7ec' - NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} + NEXT_PUBLIC_ONFINALITY_KEY: 84bb59f4-05cc-440b-8fd4-7917623a90c6 NEXT_PUBLIC_IPFS_GATEWAY: 'https://cloudflare-ipfs.com/ipfs/' NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441' NEXT_PUBLIC_ONBOARD_API_HOST: 'https://onboard-api.centrifuge.io/' @@ -139,7 +139,7 @@ jobs: NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmddkTgX879eV9shYZ6R8MMKM6jjXS7RzpuBNrRt8anC7t' NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f' NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json' - NEXT_PUBLIC_RPC_URL: 'https://mainnet.infura.io/v3/ed5e0e19bcbc427cbf8f661736d44516' + NEXT_PUBLIC_RPC_URL: 'https://eth.api.onfinality.io/rpc?apikey=84bb59f4-05cc-440b-8fd4-7917623a90c6' NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL: 'https://api.goldsky.com/api/public/project_clhi43ef5g4rw49zwftsvd2ks/subgraphs/main/prod/gn' NEXT_PUBLIC_TRANSACTION_TIMEOUT: '3600' diff --git a/.github/workflows/tinlake-ui-pull-request.yml b/.github/workflows/tinlake-ui-pull-request.yml index d6faa8986..c6c03a8d7 100644 --- a/.github/workflows/tinlake-ui-pull-request.yml +++ b/.github/workflows/tinlake-ui-pull-request.yml @@ -55,7 +55,7 @@ jobs: NEXT_PUBLIC_ENV: 'demo' NEXT_PUBLIC_ETHERSCAN_URL: 'https://goerli.etherscan.io' NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING: '0x5ca22a7cD0911c0b8279faEC3F3273AE94692E34,0xdA709C17ac67fA92d6cF6E92370809694fa9714a' - NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} + NEXT_PUBLIC_ONFINALITY_KEY: 0e1c049f-d876-4e77-a45f-b5afdf5739b2 NEXT_PUBLIC_IPFS_GATEWAY: 'https://cloudflare-ipfs.com/ipfs/' NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS: '0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696' NEXT_PUBLIC_ONBOARD_API_HOST: 'https://onboard-api.catalyst.cntrfg.com/' @@ -65,7 +65,7 @@ jobs: NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmdUg4VgLQg6uDBHxPjiMXoawgPM3LpBzuZr3ejCQTkuet' NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f' NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json' - NEXT_PUBLIC_RPC_URL: 'https://goerli.infura.io/v3/f9ba987e8cb34418bb53cdbd4d8321b5' + NEXT_PUBLIC_RPC_URL: 'https://eth-goerli.api.onfinality.io/rpc?apikey=0e1c049f-d876-4e77-a45f-b5afdf5739b2' NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL: 'https://api.thegraph.com/subgraphs/name/offerijns/tinlake-goerli' NEXT_PUBLIC_TRANSACTION_TIMEOUT: '3600' @@ -131,7 +131,7 @@ jobs: NEXT_PUBLIC_ENV: 'PROD' NEXT_PUBLIC_ETHERSCAN_URL: 'https://etherscan.io' NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING: '0x4B6CA198d257D755A5275648D471FE09931b764A,0xdB3bC9fB1893222d266762e9fF857EB74D75c7D6,0xfc2950dD337ca8496C18dfc0256Fb905A7E7E5c6,0x53b2d22d07E069a3b132BfeaaD275b10273d381E,0x0CED6166873038Ac0cc688e7E6d19E2cBE251Bf0,0x4cA805cE8EcE2E63FfC1F9f8F2731D3F48DF89Df,0x82B8617A16e388256617FeBBa1826093401a3fE5,0x560Ac248ce28972083B718778EEb0dbC2DE55740,0x3d167bd08f762FD391694c67B5e6aF0868c45538,0x3B03863BD553C4CE07eABF2278016533451c9101,0x09e43329552c9D81cF205Fd5f44796fBC40c822e,0xF96F18F2c70b57Ec864cC0C8b828450b82Ff63e3,0xd8486C565098360A24f858088a6D29a380dDF7ec' - NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }} + NEXT_PUBLIC_ONFINALITY_KEY: 84bb59f4-05cc-440b-8fd4-7917623a90c6 NEXT_PUBLIC_IPFS_GATEWAY: 'https://cloudflare-ipfs.com/ipfs/' NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441' NEXT_PUBLIC_ONBOARD_API_HOST: 'https://onboard-api.catalyst.cntrfg.com/' @@ -141,7 +141,7 @@ jobs: NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmddkTgX879eV9shYZ6R8MMKM6jjXS7RzpuBNrRt8anC7t' NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f' NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json' - NEXT_PUBLIC_RPC_URL: 'https://mainnet.infura.io/v3/ed5e0e19bcbc427cbf8f661736d44516' + NEXT_PUBLIC_RPC_URL: 'https://eth.api.onfinality.io/rpc?apikey=84bb59f4-05cc-440b-8fd4-7917623a90c6' NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL: 'https://api.goldsky.com/api/public/project_clhi43ef5g4rw49zwftsvd2ks/subgraphs/main/prod/gn' NEXT_PUBLIC_TRANSACTION_TIMEOUT: '3600' diff --git a/tinlake-ui/.env.goerli-example b/tinlake-ui/.env.goerli-example index 68421d4ec..98a1c4576 100644 --- a/tinlake-ui/.env.goerli-example +++ b/tinlake-ui/.env.goerli-example @@ -4,7 +4,7 @@ NEXT_PUBLIC_CLAIM_CFG_CONTRACT_ADDRESS=0x297237e17F327f8e5C8dEd78b15761A7D513353 NEXT_PUBLIC_ENV=demo NEXT_PUBLIC_ETHERSCAN_URL=https://goerli.etherscan.io NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING=0x5ca22a7cD0911c0b8279faEC3F3273AE94692E34,0xdA709C17ac67fA92d6cF6E92370809694fa9714a -NEXT_PUBLIC_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 +NEXT_PUBLIC_ONFINALITY_KEY=0e1c049f-d876-4e77-a45f-b5afdf5739b2 NEXT_PUBLIC_IPFS_GATEWAY=https://cloudflare-ipfs.com/ipfs/ NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS=0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696 NEXT_PUBLIC_ONBOARD_API_HOST=https://onboard-api.catalyst.cntrfg.com/ @@ -14,6 +14,6 @@ NEXT_PUBLIC_POOLS_CONFIG=goerliStaging NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE=QmXJTtXoBG9W4MhiDaXSZap3kfAoxSjMQaoVqWyNEbD16r NEXT_PUBLIC_PORTIS_KEY=bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f NEXT_PUBLIC_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json -NEXT_PUBLIC_RPC_URL=https://goerli.infura.io/v3/f9ba987e8cb34418bb53cdbd4d8321b5 +NEXT_PUBLIC_RPC_URL=https://eth-goerli.api.onfinality.io/rpc?apikey=0e1c049f-d876-4e77-a45f-b5afdf5739b2 NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL=https://api.thegraph.com/subgraphs/name/offerijns/tinlake-goerli NEXT_PUBLIC_TRANSACTION_TIMEOUT=3600 diff --git a/tinlake-ui/.env.kovan-example b/tinlake-ui/.env.kovan-example deleted file mode 100644 index 652b110ef..000000000 --- a/tinlake-ui/.env.kovan-example +++ /dev/null @@ -1,19 +0,0 @@ -# kovan -NEXT_PUBLIC_CENTRIFUGE_CHAIN_URL=wss://fullnode.catalyst.cntrfg.com -NEXT_PUBLIC_CLAIM_CFG_CONTRACT_ADDRESS=0x297237e17F327f8e5C8dEd78b15761A7D513353b -NEXT_PUBLIC_ENV=demo -NEXT_PUBLIC_ETHERSCAN_URL=https://kovan.etherscan.io -NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING=0x1f4155D64D75555B9B36E4514C0FCC11313d5A54,0x25dF507570c8285E9c8E7FFabC87db7836850dCd -NEXT_PUBLIC_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 -NEXT_PUBLIC_IPFS_GATEWAY=https://cloudflare-ipfs.com/ipfs/ -NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS=0x2cc8688c5f75e365aaeeb4ea8d6a480405a48d2a -NEXT_PUBLIC_ONBOARD_API_HOST=https://onboard-api.catalyst.cntrfg.com/ -NEXT_PUBLIC_RWA_MARKET_ONBOARD_RETURN_URL=https://rwamarket.io -NEXT_PUBLIC_POOL_REGISTRY=0x8FE85CeAe6157C1dfcDD1c5ec99361c9722d97de -NEXT_PUBLIC_POOLS_CONFIG=kovanStaging -NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE=QmQbyqTrrvMCB4ZuUietmpqWRV3zvMCTLUK5jHz5GgTa2N -NEXT_PUBLIC_PORTIS_KEY=bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f -NEXT_PUBLIC_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json -NEXT_PUBLIC_RPC_URL=https://kovan.infura.io/v3/f9ba987e8cb34418bb53cdbd4d8321b5 -NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL=https://api.thegraph.com/subgraphs/name/centrifuge/tinlake-kovan-staging -NEXT_PUBLIC_TRANSACTION_TIMEOUT=3600 diff --git a/tinlake-ui/.env.mainnet-example b/tinlake-ui/.env.mainnet-example index b01175e2b..29cfc52ba 100644 --- a/tinlake-ui/.env.mainnet-example +++ b/tinlake-ui/.env.mainnet-example @@ -4,7 +4,7 @@ NEXT_PUBLIC_CLAIM_CFG_CONTRACT_ADDRESS=0x1cA3B2E7FfCAF83d9228a64e4726402B1d5CC05 NEXT_PUBLIC_ENV=PROD NEXT_PUBLIC_ETHERSCAN_URL=https://etherscan.io NEXT_PUBLIC_FEATURE_FLAG_NEW_ONBOARDING=0x4B6CA198d257D755A5275648D471FE09931b764A,0xdB3bC9fB1893222d266762e9fF857EB74D75c7D6,0xfc2950dD337ca8496C18dfc0256Fb905A7E7E5c6,0x53b2d22d07E069a3b132BfeaaD275b10273d381E,0x0CED6166873038Ac0cc688e7E6d19E2cBE251Bf0,0x4cA805cE8EcE2E63FfC1F9f8F2731D3F48DF89Df,0x82B8617A16e388256617FeBBa1826093401a3fE5,0x560Ac248ce28972083B718778EEb0dbC2DE55740,0x3d167bd08f762FD391694c67B5e6aF0868c45538,0x3B03863BD553C4CE07eABF2278016533451c9101,0x09e43329552c9D81cF205Fd5f44796fBC40c822e,0xF96F18F2c70b57Ec864cC0C8b828450b82Ff63e3,0xd8486C565098360A24f858088a6D29a380dDF7ec -NEXT_PUBLIC_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 +NEXT_PUBLIC_ONFINALITY_KEY=84bb59f4-05cc-440b-8fd4-7917623a90c6 NEXT_PUBLIC_IPFS_GATEWAY=https://cloudflare-ipfs.com/ipfs/ NEXT_PUBLIC_MULTICALL_CONTRACT_ADDRESS=0xeefba1e63905ef1d7acba5a8513c70307c1ce441 NEXT_PUBLIC_ONBOARD_API_HOST=https://onboard-api.centrifuge.io/ @@ -13,6 +13,6 @@ NEXT_PUBLIC_POOLS_CONFIG=mainnetProduction NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE=QmYfjiwzdCbpv3YkqAHit1KPDAVpftBnWeyaNfaJYBuEvW NEXT_PUBLIC_PORTIS_KEY=bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f NEXT_PUBLIC_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json -NEXT_PUBLIC_RPC_URL=https://mainnet.infura.io/v3/ed5e0e19bcbc427cbf8f661736d44516 +NEXT_PUBLIC_RPC_URL=https://eth.api.onfinality.io/rpc?apikey=84bb59f4-05cc-440b-8fd4-7917623a90c6 NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL=https://api.goldsky.com/api/public/project_clhi43ef5g4rw49zwftsvd2ks/subgraphs/main/prod/gn NEXT_PUBLIC_TRANSACTION_TIMEOUT=3600 \ No newline at end of file diff --git a/tinlake-ui/config.ts b/tinlake-ui/config.ts index d88b70d55..fa2b94eb3 100644 --- a/tinlake-ui/config.ts +++ b/tinlake-ui/config.ts @@ -2,7 +2,6 @@ import contractAbiPoolRegistry from '@centrifuge/tinlake-js/src/abi/PoolRegistry import BN from 'bn.js' import { ethers } from 'ethers' import * as yup from 'yup' -import { networkUrlToName } from './utils/networkNameResolver' interface SecuritizeData { issuerId: string @@ -129,9 +128,8 @@ interface Config { transactionTimeout: number tinlakeDataBackendUrl: string isDemo: boolean - network: 'Mainnet' | 'Kovan' | 'Goerli' portisApiKey: string - infuraKey: string + onfinalityKey: string gasLimit: number onboardAPIHost: string featureFlagNewOnboardingPools: string[] @@ -349,19 +347,14 @@ const config: Config = { .url() .validateSync(process.env.NEXT_PUBLIC_TINLAKE_DATA_BACKEND_URL), isDemo: yup.string().required('NEXT_PUBLIC_ENV is required').validateSync(process.env.NEXT_PUBLIC_ENV) === 'demo', - network: yup - .mixed<'Mainnet' | 'Kovan' | 'Goerli'>() - .required('NEXT_PUBLIC_RPC_URL is required') - .oneOf(['Mainnet', 'Kovan', 'Goerli']) - .validateSync(networkUrlToName(process.env.NEXT_PUBLIC_RPC_URL || '')), portisApiKey: yup .string() .required('NEXT_PUBLIC_PORTIS_KEY is required') .validateSync(process.env.NEXT_PUBLIC_PORTIS_KEY), - infuraKey: yup + onfinalityKey: yup .string() - .required('NEXT_PUBLIC_INFURA_KEY is required') - .validateSync(process.env.NEXT_PUBLIC_INFURA_KEY), + .required('NEXT_PUBLIC_ONFINALITY_KEY is required') + .validateSync(process.env.NEXT_PUBLIC_ONFINALITY_KEY), gasLimit: yup.number().required('gasLimit is required').validateSync('7000000'), onboardAPIHost: yup .string() diff --git a/tinlake-ui/services/onboard/index.ts b/tinlake-ui/services/onboard/index.ts index ce50e6bd9..c4d69afb0 100644 --- a/tinlake-ui/services/onboard/index.ts +++ b/tinlake-ui/services/onboard/index.ts @@ -1,4 +1,4 @@ -import { default as init, default as Onboard } from '@web3-onboard/core' +import { default as init } from '@web3-onboard/core' import injectedModule from '@web3-onboard/injected-wallets' import ledgerModule from '@web3-onboard/ledger' import portisModule from '@web3-onboard/portis' @@ -29,13 +29,13 @@ export async function initOnboard(): Promise { id: '1', token: 'ETH', label: 'Ethereum Mainnet', - rpcUrl: `https://mainnet.infura.io/v3/${process.env.NEXT_PUBLIC_INFURA_KEY}`, + rpcUrl: `https://eth.api.onfinality.io/rpc?apikey=${process.env.NEXT_PUBLIC_ONFINALITY_KEY}`, }, { id: '5', token: 'goerliETH', label: 'Ethereum Goerli Testnet', - rpcUrl: `https://goerli.infura.io/v3/${process.env.NEXT_PUBLIC_INFURA_KEY}`, + rpcUrl: `https://eth-goerli.api.onfinality.io/rpc?apikey=${process.env.NEXT_PUBLIC_ONFINALITY_KEY}`, }, ], appMetadata: {