diff --git a/docs/dcl-edit.md b/docs/dcl-edit.md index a3e2d99..b5f242d 100644 --- a/docs/dcl-edit.md +++ b/docs/dcl-edit.md @@ -25,20 +25,63 @@ Please refer to [DCL-Edit Install Instructions](https://dcl-edit.com/install-guide) -## Edit the scene with DCL-Edit +## Create a Decentraland scene project -With DCL-Edit, you can place and manipulate objects in your scene just like in any other state-of-the-art game engine. +If you don't have a DCL scene project yet, create one -Launch DCL-Edit from your scene folder: +- create an empty folder +- go into this new folder +- run the following command + ``` + dcl init -p scene + ``` + +## Install @bosonprotocol/boson-dcl and their dependencies + +In your scene project folder, run npm to install @bosonprotocol/boson-dcl library and some required dependencies in your scene + +```bash +npm install -D eth-connect patch-package ``` -dcl-edit + +```bash +npm install @dcl/crypto-scene-utils @dcl/ecs-scene-utils ``` -### Note: +```bash +npm install @bosonprotocol/boson-dcl +``` + +Once you have added all dependencies in your scene project, please launch the build to finish initializing it: +```bash +dcl build +``` + +### Notes: +- You may have some building errors, that are removed by adding some compiler configuration properties in the `tsconfig.json` file + ```ts + { + "compilerOptions": { + ... + "skipLibCheck": true + }, + ... + } + + ``` - The complete example code created for your scene at this stage (in `./src/game.ts`) can be removed, as you won't probably use it. Instead, you will be asked to call the SceneFactory method generated by DCL-Edit when you'll save your scene (details given in the next steps). +## Edit the scene with DCL-Edit + +With DCL-Edit, you can place and manipulate objects in your scene just like in any other state-of-the-art game engine. + +Launch DCL-Edit from your scene folder: +``` +dcl-edit +``` + ### Add a BosonConfigurator component This component is required to initialize the **@bosonprotocol/boson-dcl** library with the correct configuration. diff --git a/library/docs/boson-dcl.getenvironment.md b/library/docs/boson-dcl.getenvironment.md index dd1a55d..566265f 100644 --- a/library/docs/boson-dcl.getenvironment.md +++ b/library/docs/boson-dcl.getenvironment.md @@ -7,9 +7,12 @@ Signature: ```typescript -export declare function getEnvironment(): EnvironmentType; +export declare function getEnvironment(): { + envName: EnvironmentType; + configId: ConfigId; +}; ``` Returns: -EnvironmentType +{ envName: EnvironmentType; configId: ConfigId; } diff --git a/library/etc/boson-dcl.api.md b/library/etc/boson-dcl.api.md index 34500be..90b9fab 100755 --- a/library/etc/boson-dcl.api.md +++ b/library/etc/boson-dcl.api.md @@ -189,7 +189,10 @@ export function getBalanceByCurrency(token: Token, walletAddress: string): Promi export function getBalanceDecimalised(address: string): Promise; // @public (undocumented) -export function getEnvironment(): EnvironmentType; +export function getEnvironment(): { + envName: EnvironmentType; + configId: ConfigId; +}; // @public (undocumented) export function getEthPrice(_query: TemplateStringsArray): Promise; diff --git a/library/src/core-sdk.ts b/library/src/core-sdk.ts index 463b11f..9be26ae 100755 --- a/library/src/core-sdk.ts +++ b/library/src/core-sdk.ts @@ -11,6 +11,7 @@ import { EnvironmentType, ConfigId, subgraph, + getEnvConfigById, } from "@bosonprotocol/core-sdk"; import { Delay } from "./ecs-utils-clone/delay"; import { @@ -27,7 +28,8 @@ import { getUserData } from "@decentraland/Identity"; let httpRM: RequestManager; let tokensList: Token[] | undefined; -let specifiedEnv: EnvironmentType; +let specifiedEnvName: EnvironmentType; +let specifiedConfigId: ConfigId; let specifiedInventory: string[]; /** * @public @@ -60,6 +62,8 @@ export async function initCoreSdk( httpRM = new RequestManager(provider); // TODO: tokensList should be passed in configuration, independently from biconomy config tokensList = bosonConfigs[envName]?.biconomy?.apiIds.tokens; + specifiedEnvName = envName; + specifiedConfigId = configId; specifiedInventory = inventory; const ethConnectAdapter = new EthConnectAdapter( httpRM, @@ -84,15 +88,30 @@ export async function initCoreSdk2( inventory: string[] ): Promise { const { envName, configId, biconomy, providerUrl } = bosonConfiguration; + const coreSdkConfig = getEnvConfigById(envName, configId); + if (!coreSdkConfig) { + throw new Error( + `Invalid coreSDK configuration (envName: ${envName}, configId: ${configId})` + ); + } const metaTx = biconomy ? processBiconomyConfig(envName, configId, biconomy) : undefined; const signer = await getProvider(); const metamaskRM = new RequestManager(signer); + const chainId = await metamaskRM.net_version(); + if (!metaTx && chainId !== String(coreSdkConfig.chainId)) { + throw new Error( + `Wallet must be connected to chainId ${coreSdkConfig.chainId} (current: ${chainId}), or meta-transactions should be activated for this chain` + ); + } + const provider: HTTPProvider = new HTTPProvider(providerUrl); httpRM = new RequestManager(provider); tokensList = _tokensList; + specifiedEnvName = envName; + specifiedConfigId = configId; specifiedInventory = inventory; const ethConnectAdapter = new EthConnectAdapter( httpRM, @@ -448,6 +467,9 @@ export function getTokenData( return result; } -export function getEnvironment(): EnvironmentType { - return specifiedEnv; +export function getEnvironment(): { + envName: EnvironmentType; + configId: ConfigId; +} { + return { envName: specifiedEnvName, configId: specifiedConfigId }; } diff --git a/library/src/scene/kiosk/pages/completePage.ts b/library/src/scene/kiosk/pages/completePage.ts index 0541095..008ada8 100755 --- a/library/src/scene/kiosk/pages/completePage.ts +++ b/library/src/scene/kiosk/pages/completePage.ts @@ -46,11 +46,7 @@ export class CompletePage { openseaUrlBase = ""; bosonDAppUrlBase = ""; - constructor( - _kiosk: ProductHandle, - _parent: Entity, - _productData: any - ) { + constructor(_kiosk: ProductHandle, _parent: Entity, _productData: any) { this.kiosk = _kiosk; this.productData = _productData; @@ -233,22 +229,40 @@ export class CompletePage { }) ); - switch (getEnvironment()) { + const { envName, configId } = getEnvironment(); + switch (envName) { case "local": + this.bosonDAppUrlBase = "http://localhost:3000"; + break; case "testing": - this.explorerUrlBase = "https://mumbai.polygonscan.com"; - this.openseaUrlBase = "https://testnets.opensea.io/assets/mumbai"; this.bosonDAppUrlBase = "https://interface-test.on.fleek.co"; break; case "staging": - this.explorerUrlBase = "https://mumbai.polygonscan.com"; - this.openseaUrlBase = "https://testnets.opensea.io/assets/mumbai"; this.bosonDAppUrlBase = "https://interface-staging.on.fleek.co"; break; case "production": + this.bosonDAppUrlBase = "https://bosonapp.io"; + break; + } + switch (configId) { + case "local-31337-0": + case "testing-80001-0": + case "staging-80001-0": + this.explorerUrlBase = "https://mumbai.polygonscan.com"; + this.openseaUrlBase = "https://testnets.opensea.io/assets/mumbai"; + break; + case "testing-5-0": + case "staging-5-0": + this.explorerUrlBase = "https://goerli.etherscan.io"; + this.openseaUrlBase = "https://testnets.opensea.io/assets/goerli"; + break; + case "production-137-0": this.explorerUrlBase = "https://polygonscan.com"; this.openseaUrlBase = "https://opensea.io/assets/matic"; - this.bosonDAppUrlBase = "https://bosonapp.io"; + break; + case "production-1-0": + this.explorerUrlBase = "https://etherscan.io"; + this.openseaUrlBase = "https://opensea.io/assets/ethereum"; break; } @@ -312,6 +326,15 @@ export class CompletePage { this.openSeaLinkClickBox.addComponentOrReplace( new OnPointerDown( () => { + log("openseaUrlBase", this.openseaUrlBase); + log( + "openseaUrl", + this.openseaUrlBase + + "/" + + productData.seller.voucherCloneAddress + + "/" + + tokenId + ); openExternalURL( this.openseaUrlBase + "/" + diff --git a/library/src/scene/kiosk/pages/fairExchangePolicyPage.ts b/library/src/scene/kiosk/pages/fairExchangePolicyPage.ts index db7f16b..6d69889 100755 --- a/library/src/scene/kiosk/pages/fairExchangePolicyPage.ts +++ b/library/src/scene/kiosk/pages/fairExchangePolicyPage.ts @@ -227,8 +227,9 @@ export class FairExchangePolicyPage { // Click boxes let URLBase = ""; + const { envName } = getEnvironment(); - switch (getEnvironment()) { + switch (envName) { case "local": case "testing": URLBase = "https://interface-test.on.fleek.co/"; diff --git a/scene/src/boson.ts b/scene/src/boson.ts index c033018..e8af826 100755 --- a/scene/src/boson.ts +++ b/scene/src/boson.ts @@ -1,42 +1,25 @@ -import { initCoreSdk } from '@bosonprotocol/boson-dcl' -import { getUserData, UserData } from '@decentraland/Identity' +import { BosonConfigurator } from '@bosonprotocol/boson-dcl' import { bosonConfig } from './bosonConfig' import * as crypto from '@dcl/crypto-scene-utils' -import { getProvider } from '@decentraland/web3-provider' -import { RequestManager } from 'eth-connect' - -// const targetEnv = 'production' -// const targetEnv = 'staging' -// const targetEnv = 'testing' - -async function getWalletAddress(): Promise { - return await getUserData() - .then((userAccount) => { - return userAccount?.publicKey || (userAccount?.userId as string) - }) - .catch((error) => { - log(error) - return '' - }) -} export async function useBoson() { - const provider = await getProvider() - const requestManager = new RequestManager(provider) - const chainId = await requestManager.net_version() - log('chainId', chainId) - // If user wallet is connected on Ethereum mainnet --> PRODUCTION - const targetEnv = chainId === '1' ? 'production' : 'staging' - const configId = chainId === '1' ? 'production-137-0' : 'staging-80001-0' - log('Initialize BOSON on env', targetEnv, 'config', configId) - const userAccount: UserData = (await getUserData()) as UserData + const productionConfigId = 'production-137-0' // polygon + // const productionConfigId = 'production-1-0' // ethereum + const productionBosonConfig = bosonConfig[productionConfigId] + if (!productionBosonConfig) { + throw new Error(`Unable to get bosonConfig for configId ${productionConfigId}`) + } + const stagingConfigId = 'staging-80001-0' // mumbai + // const stagingConfigId = 'staging-5-0' // goerli + const stagingBosonConfig = bosonConfig[stagingConfigId] + if (!stagingBosonConfig) { + throw new Error(`Unable to get bosonConfig for configId ${stagingConfigId}`) + } - const walletAddress = userAccount?.publicKey || userAccount?.userId - let inventory: string[] = []; + let inventory: string[] = [] try { inventory = await crypto.avatar.getUserInventory() } catch (e) {} - const coreSDK = await initCoreSdk(targetEnv, configId, bosonConfig, getWalletAddress, inventory) - return { coreSDK, userAccount, walletAddress, targetEnv, configId } + return BosonConfigurator.initialize(productionBosonConfig, stagingBosonConfig, inventory) } diff --git a/scene/src/bosonConfig.example.ts b/scene/src/bosonConfig.example.ts index f0758f4..df47a97 100644 --- a/scene/src/bosonConfig.example.ts +++ b/scene/src/bosonConfig.example.ts @@ -1,44 +1,9 @@ -import { BosonConfigs } from '@bosonprotocol/boson-dcl' +import { BosonConfiguration } from '@bosonprotocol/boson-dcl' -export const bosonConfig: BosonConfigs = { - testing: { - // mumbai - biconomy: { - apiKey: 'testing-project-api-key', - apiIds: { - protocol: { - method: 'executeMetaTransaction', - apiId: 'testing-project-protocol-api-id' - }, - tokens: [ - { - // boson - name: 'boson', - address: '0x1f5431e8679630790e8eba3a9b41d1bb4d41aed0', - method: 'executeMetaTransaction', - apiId: 'testing-project-boson-token-api-id' - }, - { - // weth - name: 'weth', - address: '0xa6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa', - method: 'executeMetaTransaction', - apiId: 'testing-project-weth-token-api-id' - }, - { - // usdc - name: 'usdc', - address: '0xe6b8a5cf854791412c1f6efc7caf629f5df1c747', - method: 'executeMetaTransaction', - apiId: 'testing-project-usdc-token-api-id' - } - ] - } - }, - providerUrl: 'mumbai-rpc-node' - }, - staging: { - // mumbai +export const bosonConfig: { [key: string]: BosonConfiguration } = { + 'staging-80001-0': { + envName: 'staging', + configId: 'staging-80001-0', biconomy: { apiKey: 'staging-project-api-key', apiIds: { @@ -73,8 +38,14 @@ export const bosonConfig: BosonConfigs = { }, providerUrl: 'mumbai-rpc-node' }, - production: { - // polygon + 'staging-5-0': { + envName: 'staging', + configId: 'staging-5-0', + providerUrl: 'goerli-rpc-node' + }, + 'production-137-0': { + envName: 'production', + configId: 'production-137-0', biconomy: { apiKey: 'production-project-api-key', apiIds: { @@ -122,5 +93,10 @@ export const bosonConfig: BosonConfigs = { } }, providerUrl: 'polygon-rpc-node' + }, + 'production-1-0': { + envName: 'production', + configId: 'production-1-0', + providerUrl: 'ethereum-rpc-node' } } diff --git a/scene/src/bosonConfig.ts b/scene/src/bosonConfig.ts index 66b1f80..1de3918 100755 --- a/scene/src/bosonConfig.ts +++ b/scene/src/bosonConfig.ts @@ -1,44 +1,9 @@ -import { BosonConfigs } from '@bosonprotocol/boson-dcl' +import { BosonConfiguration } from '@bosonprotocol/boson-dcl' -export const bosonConfig: BosonConfigs = { - testing: { - // mumbai - biconomy: { - apiKey: '7gGMKijfb.eeecde6e-0aef-4744-8d4c-267ce442b814', - apiIds: { - protocol: { - method: 'executeMetaTransaction', - apiId: '0a35ec78-dfde-4cb8-b015-cd793684b71f' - }, - tokens: [ - { - // boson - name: 'boson', - address: '0x1f5431e8679630790e8eba3a9b41d1bb4d41aed0', - method: 'executeMetaTransaction', - apiId: '0cfeee86-a304-4761-a1fd-dcf63ffd153c' - }, - { - // weth - name: 'weth', - address: '0xa6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa', - method: 'executeMetaTransaction', - apiId: '29560f78-014f-4d48-97e8-779545606df6' - }, - { - // usdc - name: 'usdc', - address: '0xe6b8a5cf854791412c1f6efc7caf629f5df1c747', - method: 'executeMetaTransaction', - apiId: 'a3154a77-c410-456e-9d90-9f56a5787ae8' - } - ] - } - }, - providerUrl: 'https://rpc-mumbai.maticvigil.com' - }, - staging: { - // mumbai +export const bosonConfig: { [key: string]: BosonConfiguration } = { + 'staging-80001-0': { + envName: 'staging', + configId: 'staging-80001-0', biconomy: { apiKey: '-zIIdi_LF.27130c33-e2c6-4cd8-9419-fb053c4963cf', apiIds: { @@ -71,10 +36,16 @@ export const bosonConfig: BosonConfigs = { ] } }, - providerUrl: 'https://rpc-mumbai.maticvigil.com' + providerUrl: 'https://polygon-mumbai.infura.io/v3/faa208f0a9d24b6b9eac43ae0fa72140' + }, + 'staging-5-0': { + envName: 'staging', + configId: 'staging-5-0', + providerUrl: 'https://goerli.infura.io/v3/faa208f0a9d24b6b9eac43ae0fa72140' }, - production: { - // polygon + 'production-137-0': { + envName: 'production', + configId: 'production-137-0', biconomy: { apiKey: 'production-project-api-key', apiIds: { @@ -121,6 +92,11 @@ export const bosonConfig: BosonConfigs = { ] } }, - providerUrl: 'polygon-rpc-node' + providerUrl: 'https://polygon-mainnet.infura.io/v3/faa208f0a9d24b6b9eac43ae0fa72140' + }, + 'production-1-0': { + envName: 'production', + configId: 'production-1-0', + providerUrl: 'https://mainnet.infura.io/v3/faa208f0a9d24b6b9eac43ae0fa72140' } } diff --git a/scene/src/game.ts b/scene/src/game.ts index f48c029..9f44357 100755 --- a/scene/src/game.ts +++ b/scene/src/game.ts @@ -16,12 +16,26 @@ const productsPerEnv: { [key: string]: Array<{ sellerId: string; productUUID: st { sellerId: '4', productUUID: '3fe1ace-b45e-715b-4be-a48a053c566f' }, { sellerId: '4', productUUID: 'cbbedf-6331-8b77-560f-3c144f6d8b23' } ], + 'staging-5-0': [ + { sellerId: '2', productUUID: '5312aec-f146-27b7-edfb-721540eb6' }, + { sellerId: '2', productUUID: '5312aec-f146-27b7-edfb-721540eb6' }, + { sellerId: '2', productUUID: '5312aec-f146-27b7-edfb-721540eb6' }, + { sellerId: '2', productUUID: '5312aec-f146-27b7-edfb-721540eb6' }, + { sellerId: '2', productUUID: '5312aec-f146-27b7-edfb-721540eb6' } + ], 'production-137-0': [ { sellerId: '2', productUUID: 'a234728-dc54-faa6-f1e-0886d3d0e18' }, { sellerId: '2', productUUID: 'f04f0f6-107a-b1ef-a4af-dc4bd0a8eb1f' }, { sellerId: '2', productUUID: '5d7ad1-64ff-e80-bce8-14a6f32f72e' }, { sellerId: '13', productUUID: '3fe1ace-b45e-715b-4be-a48a053c566f' }, { sellerId: '202', productUUID: 'cbbedf-6331-8b77-560f-3c144f6d8b23' } + ], + 'production-1-0': [ + { sellerId: '2', productUUID: '3f27ad-d13-8f15-df8-df018271d0a' }, + { sellerId: '2', productUUID: '3f27ad-d13-8f15-df8-df018271d0a' }, + { sellerId: '2', productUUID: '81355af-a10e-052f-88c-2f27bf234b88' }, + { sellerId: '2', productUUID: '81355af-a10e-052f-88c-2f27bf234b88' }, + { sellerId: '2', productUUID: 'dda2fa-1242-32c1-1c8-f3548600ecd5' } ] } @@ -35,7 +49,7 @@ floor.addComponent(new GLTFShape('models/FloorBaseGrass_01.glb')) engine.addEntity(floor) async function loadScene() { - void useBoson().then(async ({ coreSDK, userAccount, walletAddress, targetEnv, configId }) => { + void useBoson().then(async ({ coreSDK, userAccount, walletAddress, envName, configId }) => { const allBalances: object = await getAllBalances(walletAddress) Kiosk.init(coreSDK, userAccount, walletAddress, allBalances) diff --git a/scene2/src/boson.ts b/scene2/src/boson.ts deleted file mode 100644 index 9358eb9..0000000 --- a/scene2/src/boson.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { initCoreSdk } from '@bosonprotocol/boson-dcl' -import { getUserData, UserData } from '@decentraland/Identity' -import { bosonConfig } from './bosonConfig' -import * as crypto from '@dcl/crypto-scene-utils' -import { getProvider } from '@decentraland/web3-provider' -import { RequestManager } from 'eth-connect' - -// const targetEnv = 'production' -// const targetEnv = 'staging' -// const targetEnv = 'testing' - -async function getWalletAddress(): Promise { - return await getUserData() - .then((userAccount) => { - return userAccount?.publicKey || (userAccount?.userId as string) - }) - .catch((error) => { - log(error) - return '' - }) -} - -export async function useBoson() { - const provider = await getProvider() - const requestManager = new RequestManager(provider) - const chainId = await requestManager.net_version() - // If user wallet is connected on Ethereum mainnet --> PRODUCTION - const targetEnv = chainId === '1' ? 'production' : 'staging' - const configEnv = chainId === '1' ? 'production-137-0' : 'staging-80001-0' - log('Initialize BOSON on env', targetEnv, 'config', configEnv) - const userAccount: UserData = (await getUserData()) as UserData - - const walletAddress = userAccount?.publicKey || userAccount?.userId - let inventory: string[] = []; - try { - inventory = await crypto.avatar.getUserInventory() - } catch (e) {} - const coreSDK = await initCoreSdk(targetEnv, configEnv, bosonConfig, getWalletAddress, inventory) - - return { coreSDK, userAccount, walletAddress } -} diff --git a/scene2/src/bosonConfig.ts b/scene2/src/bosonConfig.ts deleted file mode 100644 index 66b1f80..0000000 --- a/scene2/src/bosonConfig.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { BosonConfigs } from '@bosonprotocol/boson-dcl' - -export const bosonConfig: BosonConfigs = { - testing: { - // mumbai - biconomy: { - apiKey: '7gGMKijfb.eeecde6e-0aef-4744-8d4c-267ce442b814', - apiIds: { - protocol: { - method: 'executeMetaTransaction', - apiId: '0a35ec78-dfde-4cb8-b015-cd793684b71f' - }, - tokens: [ - { - // boson - name: 'boson', - address: '0x1f5431e8679630790e8eba3a9b41d1bb4d41aed0', - method: 'executeMetaTransaction', - apiId: '0cfeee86-a304-4761-a1fd-dcf63ffd153c' - }, - { - // weth - name: 'weth', - address: '0xa6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa', - method: 'executeMetaTransaction', - apiId: '29560f78-014f-4d48-97e8-779545606df6' - }, - { - // usdc - name: 'usdc', - address: '0xe6b8a5cf854791412c1f6efc7caf629f5df1c747', - method: 'executeMetaTransaction', - apiId: 'a3154a77-c410-456e-9d90-9f56a5787ae8' - } - ] - } - }, - providerUrl: 'https://rpc-mumbai.maticvigil.com' - }, - staging: { - // mumbai - biconomy: { - apiKey: '-zIIdi_LF.27130c33-e2c6-4cd8-9419-fb053c4963cf', - apiIds: { - protocol: { - method: 'executeMetaTransaction', - apiId: 'fc2b3fb0-ae4b-405e-970e-ddcb0643350a' - }, - tokens: [ - { - // boson - name: 'boson', - address: '0x1f5431e8679630790e8eba3a9b41d1bb4d41aed0', - method: 'executeMetaTransaction', - apiId: '7ab660a5-e337-49d7-ad1b-fd688612c943' - }, - { - // weth - name: 'weth', - address: '0xa6fa4fb5f76172d178d61b04b0ecd319c5d1c0aa', - method: 'executeMetaTransaction', - apiId: '02e4ac0a-2437-47d0-9ac2-67c94f0e313f' - }, - { - // usdc - name: 'usdc', - address: '0xe6b8a5cf854791412c1f6efc7caf629f5df1c747', - method: 'executeMetaTransaction', - apiId: 'b57012d0-3437-4780-a05c-51d956fabf98' - } - ] - } - }, - providerUrl: 'https://rpc-mumbai.maticvigil.com' - }, - production: { - // polygon - biconomy: { - apiKey: 'production-project-api-key', - apiIds: { - protocol: { - method: 'executeMetaTransaction', - apiId: 'production-project-protocol-api-id' - }, - tokens: [ - { - // boson - name: 'boson', - address: '0x9B3B0703D392321AD24338Ff1f846650437A43C9', - method: 'executeMetaTransaction', - apiId: 'production-project-boson-token-api-id' - }, - { - // weth - name: 'weth', - address: '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619', - method: 'executeMetaTransaction', - apiId: 'production-project-weth-token-api-id' - }, - { - // usdc - name: 'usdc', - address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174', - method: 'executeMetaTransaction', - apiId: 'production-project-usdc-token-api-id' - }, - { - // dai - name: 'dai', - address: '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063', - method: 'executeMetaTransaction', - apiId: 'production-project-dai-token-api-id' - }, - { - // usdt - name: 'usdt', - address: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F', - method: 'executeMetaTransaction', - apiId: 'production-project-usdt-token-api-id' - } - ] - } - }, - providerUrl: 'polygon-rpc-node' - } -}