diff --git a/packages/hardhat/deploy/00_CFunctions.ts b/packages/hardhat/deploy/00_CFunctions.ts index b9e65227d..090e25689 100644 --- a/packages/hardhat/deploy/00_CFunctions.ts +++ b/packages/hardhat/deploy/00_CFunctions.ts @@ -11,14 +11,14 @@ const deployCFunctions: DeployFunction = async function (hre: HardhatRuntimeEnvi 80001: { router: process.env.CL_FUNCTIONS_ROUTER_MUMBAI, donId: process.env.CL_FUNCTIONS_DON_ID_MUMBAI, - chainSelector: 12532609583862916517n, + chainSelector: "12532609583862916517", subscriptionId: 1437, donHostedSecretsVersion: 1712770854, }, 43113: { donId: process.env.CL_FUNCTIONS_DON_ID_FUJI, router: process.env.CL_FUNCTIONS_ROUTER_FUJI, - chainSelector: 14767482510784806043n, + chainSelector: "14767482510784806043", subscriptionId: 1437, donHostedSecretsVersion: 1712770854, }, @@ -27,7 +27,7 @@ const deployCFunctions: DeployFunction = async function (hre: HardhatRuntimeEnvi if (!deploymentOptions[chainId]) throw new Error(`ChainId ${chainId} not supported`); const { router, donId, chainSelector, subscriptionId, donHostedSecretsVersion } = deploymentOptions[chainId]; - await deploy("CFunctions", { + const { address: contractAddress } = await deploy("CFunctions", { from: deployer, log: true, args: [router, donId, subscriptionId, donHostedSecretsVersion, chainSelector], @@ -35,6 +35,17 @@ const deployCFunctions: DeployFunction = async function (hre: HardhatRuntimeEnvi }); const cFunctions = await hre.ethers.getContract("CFunctions", deployer); + + // exec( + // `npx hardhat verify --network polygonMumbai ${contractAddress} ${router} ${donId} ${subscriptionId} ${donHostedSecretsVersion} ${chainSelector}`, + // (error, stdout, stderr) => { + // if (error) { + // console.error(`ERROR: ${error}`); + // return; + // } + // console.log(`SUCCESS`); + // }, + // ); }; export default deployCFunctions; diff --git a/packages/hardhat/deploy/01_ConceroCCIP.ts b/packages/hardhat/deploy/01_ConceroCCIP.ts index eb08b4456..d64456a92 100644 --- a/packages/hardhat/deploy/01_ConceroCCIP.ts +++ b/packages/hardhat/deploy/01_ConceroCCIP.ts @@ -11,27 +11,31 @@ const deployConceroCCIP: DeployFunction = async function (hre: HardhatRuntimeEnv 80001: { linkTokenAddress: process.env.LINK_MUMBAI, router: process.env.CL_CCIP_ROUTER_MUMBAI, - // chainSelector: 12532609583862916517n, }, 43113: { linkTokenAddress: process.env.LINK_FUJI, router: process.env.CL_CCIP_ROUTER_FUJI, - // chainSelector: 14767482510784806043n, }, }; + if (!deploymentOptions[chainId]) throw new Error(`ChainId ${chainId} not supported`); const { linkTokenAddress, router } = deploymentOptions[chainId]; - await deploy("ConceroCCIP", { + const { address: contractAddress } = await deploy("ConceroCCIP", { from: deployer, log: true, args: [linkTokenAddress, router], autoMine: true, }); - const conceroBridge = await hre.ethers.getContract("ConceroCCIP", deployer); + const conceroCCIP = await hre.ethers.getContract("ConceroCCIP", deployer); + + // exec(`npx hardhat verify --network polygonMumbai ${contractAddress} ${linkTokenAddress} ${router}`, (error, stdout, stderr) => { + // console.log(stdout); + // console.log(stderr); + // console.log(error); + // }); }; -export default deployConceroCCIP; deployConceroCCIP.tags = ["ConceroCCIP"]; -// yarn deploy --tags CFunctions +export default deployConceroCCIP; diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index 0f326f887..cc776747e 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -2465,7 +2465,7 @@ const deployedContracts = { }, 80001: { CFunctions: { - address: "0x936c74b937c4794302ec069269dA152BA94736f6", + address: "0xfdf8aE2b4e1576f659BF0f46f8939A1F3FD11D95", abi: [ { inputs: [ @@ -3063,7 +3063,7 @@ const deployedContracts = { }, }, ConceroCCIP: { - address: "0x711B1B06f5bb85Ca516ed97c2882542A9701c4a3", + address: "0x4a558664f726c52aD67fc27c05b7965e265B5c88", abi: [ { inputs: [