diff --git a/.env.example b/.env.example index 417b99f..f13a1ad 100644 --- a/.env.example +++ b/.env.example @@ -13,7 +13,7 @@ PUBLIC_KEY="0xYourKey" RPC_URL=https://endpoints.omniatech.io/v1/matic/mumbai/public AUTO_VERIFY=false ERC20_TOKEN_ADDRESS="0xA79498e38264330603F00AfEC577539B4b5D6F51" -ACHIEVO_BASE_URL="https://staging-api.achievo.xyz" +ACHIEVO_BASE_URL="https://web3-staging.cdn.summon.xyz/blockchain" ACHIEVO_AUTH_TOKEN="token" ENCRYPTION_KEY="" POLYGON_ALCHEMY_PROVIDER="https://polygon-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}" diff --git a/constants/constructor-args.ts b/constants/constructor-args.ts index 38d4422..8032d76 100644 --- a/constants/constructor-args.ts +++ b/constants/constructor-args.ts @@ -109,7 +109,7 @@ export const AvatarBoundArgs = { baseURI: '', contractURI: 'https://achievo.mypinata.cloud/ipfs/QmSDbeNWVY2CGUuLHni689L5eSrSG3iZHyTRZJWXX7GpjS', revealURI: 'Qmdk4zHamwCyqSzuWNNYypuz4FXAGdApbky7SHNsXYYQg7', - compoundURI: 'https://api.achievo.xyz/v1/uri/avatar', + compoundURI: 'https://web3.cdn.summon.xyz/v2/uri/avatar', devWallet: 'DEPLOYER_WALLET', gatingNftAddress: '0xD07180c423F9B8CF84012aA28cC174F3c433EE29', itemsNftAddress: `CONTRACT_${CONTRACT_NAME.Items}`, @@ -124,7 +124,7 @@ export const AvatarBoundArgs = { baseURI: '', contractURI: 'https://achievo.mypinata.cloud/ipfs/QmSDbeNWVY2CGUuLHni689L5eSrSG3iZHyTRZJWXX7GpjS', revealURI: 'QmZnvSyeKRQxWwcofVmq41BNCtHbBmomk8Ny8mtGRTjtzS', - compoundURI: 'https://staging-api.achievo.xyz/v1/uri/avatar', + compoundURI: 'https://web3-staging.cdn.summon.xyz/v2/uri/avatar', devWallet: 'DEPLOYER_WALLET', gatingNftAddress: '0x6E03Ea6c9aBBb78Dd761b9c71c06176c508488C3', itemsNftAddress: `CONTRACT_${CONTRACT_NAME.Items}`, @@ -195,7 +195,7 @@ export const GameSummaryArgs = { _symbol: 'GS', _defaultTokenURI: 'FILL_ME', _contractURI: 'FILL_ME', - _compoundURI: 'https://api.achievo.xyz/v1/uri/achievements', + _compoundURI: 'https://web3.cdn.summon.xyz/v2/uri/achievements', _maxPerMint: 1, _isPaused: false, _devWallet: 'DEPLOYER_WALLET', @@ -205,7 +205,7 @@ export const GameSummaryArgs = { _symbol: 'GS', _defaultTokenURI: 'FILL_ME', _contractURI: 'FILL_ME', - _compoundURI: 'https://staging-api.achievo.xyz/v1/uri/achievements', + _compoundURI: 'https://web3-staging.cdn.summon.xyz/v2/uri/achievements', _maxPerMint: 1, _isPaused: false, _devWallet: 'DEPLOYER_WALLET', diff --git a/helpers/contract.ts b/helpers/contract.ts index bd3fd9f..06ffa66 100644 --- a/helpers/contract.ts +++ b/helpers/contract.ts @@ -9,10 +9,13 @@ axios.defaults.headers.post['Content-Type'] = 'application/json'; export const submitContractDeploymentsToDB = async (deployments: Deployment[], tenant: TENANT) => { try { - await axios.post('/blockchain/v2/tenant-contracts', { - deployments, - tenant, - }); + for (const deployment of deployments) { + await axios.post('/v2/tenant-contracts', { + deployments: [deployment], + tenant, + }); + console.log('Deployment submitted to DB:', deployment.name); + } } catch (error) { console.error((error as Error).message); throw error; @@ -21,7 +24,7 @@ export const submitContractDeploymentsToDB = async (deployments: Deployment[], t export const executeFunctionCallBatch = async (calls: FunctionCall[], tenant: TENANT) => { try { - await axios.post('/blockchain/v2/tenant-contracts/functions', { + await axios.post('/v2/tenant-contracts/functions', { calls, tenant, }); @@ -35,9 +38,7 @@ export const getContractFromDB = async ( chainId: number ): Promise => { try { - const { data } = await axios.get( - `/blockchain/v2/tenant-contracts/${name}${chainId ? `?chainId=${chainId}` : ''}` - ); + const { data } = await axios.get(`/v2/tenant-contracts/${name}${chainId ? `?chainId=${chainId}` : ''}`); if (data.status === 200) { return data.data; }