-
Notifications
You must be signed in to change notification settings - Fork 8
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
Clone vouchers using create2 #703
Conversation
Changes unknown when pulling 1ec9c3c on voucher-create2 into ** on main**. |
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.
Looks good, thanks
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.
I am happy with this, i have a question which is merely informational for me
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.
Looks good. I added some suggestions, but nothing that has an impact on contracts.
@@ -743,6 +837,73 @@ describe("ProtocolInitializationHandler", async function () { | |||
).to.be.revertedWith(RevertReasons.VALUE_ZERO_NOT_ALLOWED); | |||
}); | |||
|
|||
it("sellerIds and sellerCreators length mismatch", async function () { | |||
// set invalid minResolutionPeriod |
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.
// set invalid minResolutionPeriod |
}); | ||
|
||
it("invalid seller id ", async function () { | ||
// set invalid minResolutionPeriod |
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.
// set invalid minResolutionPeriod |
function getCloneByteCodeHash(beaconProxyAddress) { | ||
return keccak256( | ||
`0x3d602d80600a3d3981f3363d3d373d3d3d363d73${beaconProxyAddress.slice(2)}5af43d82803e903d91602b57fd5bf3` | ||
); | ||
} |
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.
where did you get this value? would be nice to have some comments here :)
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.
I got it from our contracts, but otherwise this is EIP 1167 style minimal clone.
We use the code from this example.
OZ uses the same: https://blog.openzeppelin.com/deep-dive-into-the-minimal-proxy-contract
Co-authored-by: Ana Julia Bittencourt <anajuliabit@gmail.com>
Closes #702
Based on #592 which should be merged first.
Changes:
create2
instead ofcreate
incloneBosonVoucher
BeaconClientProxy
is deployed from the protocol.