-
Notifications
You must be signed in to change notification settings - Fork 156
Add verification of contracts #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: deterministic-factories
Are you sure you want to change the base?
Add verification of contracts #115
Conversation
let verificationQueue: VerificationRequest[] = [] | ||
|
||
// Helper function to encode constructor arguments based on their types | ||
function abiEncodeConstructorArguments(args: any[]): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crafted this function to avoid having to pass the types of arguments for verification
/* | ||
if (verify) { | ||
await verifyContract( | ||
queueContractForVerification( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verification of contracts is queued to separate it from deployment (mainly for having cleaner logs)
L1GatewayRouter: | ||
'contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol:L1GatewayRouter', | ||
standardGatewayTemplate: | ||
L1ERC20Gateway: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the keys of this object to use directly the name of the contract instead of custom keys (since these are not used anymore in the calling function)
useCreate2 | ||
) | ||
await initializeContract(parentGatewayRouterTemplate, [ | ||
await initializeContract('L1GatewayRouter', parentGatewayRouterTemplate, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing the name of the contract for logging mainly
This PR builds on top of #114 , adding the verification of the deployed contracts