Skip to content

Commit

Permalink
add sourcechainid to deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimo99 committed Aug 20, 2024
1 parent fdc7640 commit 1f83aff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/evm/contracts/adapters/DendrETH/DendrETHAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ contract DendrETHAdapter is BlockHashAdapter {
revert InvalidBlockHashProof();
}

lightClient.light_client_update(update);

_storeHash(SOURCE_CHAIN_ID, _blockNumber, _blockHash);

lightClient.light_client_update(update);
}
}
3 changes: 2 additions & 1 deletion packages/evm/tasks/deploy/dendreth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import { verify } from "."

task("deploy:DendrETH")
.addParam("lightclient", "address of the the light client contract", undefined, types.string)
.addParam("sourcechainid", "source chain ID", undefined, types.int)
.addFlag("verify", "whether to verify the contract on Etherscan")
.setAction(async function (taskArguments: TaskArguments, hre) {
console.log("Deploying DendrETH adapter...")
const signers: SignerWithAddress[] = await hre.ethers.getSigners()
const DendrETHAdapter = await hre.ethers.getContractFactory("DendrETHAdapter")
const constructorArguments = [taskArguments.lightclient] as const
const constructorArguments = [taskArguments.sourcechainid, taskArguments.lightclient] as const
const dendrethAdapter = await DendrETHAdapter.connect(signers[0]).deploy(...constructorArguments)
await dendrethAdapter.deployed()
console.log("DendrETH adapter deployed to:", dendrethAdapter.address)
Expand Down

0 comments on commit 1f83aff

Please sign in to comment.