Skip to content

Commit

Permalink
fix: deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
lufaque committed Apr 11, 2024
1 parent bcb025c commit 69b84ab
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
17 changes: 14 additions & 3 deletions packages/hardhat/deploy/00_CFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand All @@ -27,14 +27,25 @@ 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],
autoMine: true,
});

const cFunctions = await hre.ethers.getContract<CFunctions>("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;
Expand Down
16 changes: 10 additions & 6 deletions packages/hardhat/deploy/01_ConceroCCIP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>("ConceroCCIP", deployer);
const conceroCCIP = await hre.ethers.getContract<ConceroCCIP>("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;
4 changes: 2 additions & 2 deletions packages/nextjs/contracts/deployedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2465,7 +2465,7 @@ const deployedContracts = {
},
80001: {
CFunctions: {
address: "0x936c74b937c4794302ec069269dA152BA94736f6",
address: "0xfdf8aE2b4e1576f659BF0f46f8939A1F3FD11D95",
abi: [
{
inputs: [
Expand Down Expand Up @@ -3063,7 +3063,7 @@ const deployedContracts = {
},
},
ConceroCCIP: {
address: "0x711B1B06f5bb85Ca516ed97c2882542A9701c4a3",
address: "0x4a558664f726c52aD67fc27c05b7965e265B5c88",
abi: [
{
inputs: [
Expand Down

0 comments on commit 69b84ab

Please sign in to comment.