Skip to content

Commit

Permalink
chore: deploy bridge v2
Browse files Browse the repository at this point in the history
  • Loading branch information
noyyyy committed Jan 11, 2024
1 parent 1a4e405 commit a2a91fe
Show file tree
Hide file tree
Showing 10 changed files with 3,686 additions and 6 deletions.
47 changes: 47 additions & 0 deletions packages/dev/deploy/bnb/003_deploy_bridgeV2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { DeployFunction } from 'hardhat-deploy/types';
import { keccak256, stringToBytes } from 'viem';

const func: DeployFunction = async function ({ deployments, getNamedAccounts }) {
const { deploy, execute } = deployments;

const { prodDeployer } = await getNamedAccounts();

await deploy('GalxeBadgeReceiverV2', {
from: prodDeployer,
args: [],
log: true,
proxy: {
proxyContract: 'ERC1967Proxy',
proxyArgs: ['{implementation}', '{data}'],
execute: {
init: {
methodName: 'initialize',
args: [prodDeployer],
},
},
},
deterministicDeployment: keccak256(stringToBytes('GalxeBadgeReceiverV2_Prod')),
});

await execute('GalxeBadgeReceiverV2', { from: prodDeployer, log: true }, 'updateDstValidity', 20736, true);

await execute(
'GalxeBadgeReceiverV2',
{ from: prodDeployer, log: true },
'updateValidNftAddr',
'0x9F471abCddc810E561873b35b8aad7d78e21a48e',
true,
);

await execute(
'GalxeBadgeReceiverV2',
{ from: prodDeployer, log: true },
'updateValidNftAddr',
'0xADc466855ebe8d1402C5F7e6706Fccc3AEdB44a0',
true,
);
};

func.tags = ['GalxeBadgeReceiverV2'];

export default func;
26 changes: 21 additions & 5 deletions packages/dev/deploy/polygon/002_deploy_bridgeV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { keccak256, stringToBytes } from 'viem';
const func: DeployFunction = async function ({ deployments, getNamedAccounts }) {
const { deploy, execute } = deployments;

const { deployer } = await getNamedAccounts();
const { prodDeployer } = await getNamedAccounts();

await deploy('GalxeBadgeReceiverV2', {
from: deployer,
from: prodDeployer,
args: [],
log: true,
proxy: {
Expand All @@ -16,14 +16,30 @@ const func: DeployFunction = async function ({ deployments, getNamedAccounts })
execute: {
init: {
methodName: 'initialize',
args: [deployer],
args: [prodDeployer],
},
},
},
deterministicDeployment: keccak256(stringToBytes('GalxeBadgeReceiverV2')),
deterministicDeployment: keccak256(stringToBytes('GalxeBadgeReceiverV2_PROD')),
});

await execute('GalxeBadgeReceiverV2', { from: deployer, log: true }, 'updateDstValidity', 20736, true);
await execute('GalxeBadgeReceiverV2', { from: prodDeployer, log: true }, 'updateDstValidity', 20736, true);

await execute(
'GalxeBadgeReceiverV2',
{ from: prodDeployer, log: true },
'updateValidNftAddr',
'0xC18Eeac03F52ac67F956C3Fb7526a119475778dd',
true,
);

await execute(
'GalxeBadgeReceiverV2',
{ from: prodDeployer, log: true },
'updateValidNftAddr',
'0x1871464F087dB27823Cff66Aa88599AA4815aE95',
true,
);
};

func.tags = ['GalxeBadgeReceiverV2'];
Expand Down
Loading

0 comments on commit a2a91fe

Please sign in to comment.