Skip to content

Commit

Permalink
Update g7 contracts constructor args
Browse files Browse the repository at this point in the history
  • Loading branch information
vasinl124 committed Sep 25, 2024
1 parent 888445c commit 9511062
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
8 changes: 4 additions & 4 deletions constants/constructor-args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
Expand All @@ -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}`,
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down
17 changes: 9 additions & 8 deletions helpers/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
});
Expand All @@ -35,9 +38,7 @@ export const getContractFromDB = async (
chainId: number
): Promise<Deployment | undefined> => {
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;
}
Expand Down

0 comments on commit 9511062

Please sign in to comment.