-
Notifications
You must be signed in to change notification settings - Fork 83
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
Premint - get supported premint signature version #303
Conversation
1d60d6e
to
9a2a7de
Compare
/// @return The version of the premint signature that the contract supports. If it doesn't support premint | ||
/// returns 0 | ||
function supportedPremintSignatureVersion(address contractAddress) external view returns (string memory) { | ||
IZoraCreator1155 creatorContract = IZoraCreator1155(contractAddress); |
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.
should version be a string or an integer?
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.
hrrrm great q. when you sign the message, the version according to eip-712 is a string. so maybe it makes sense for this to actually return an array saying supportedSignatureVersions
with an array of the versions supported?
or we store internally as integers and convert to string in the eip-712 domain, and this returns a an integer which acts as a max version.
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.
String is fine for alignment for EIP-712. Another option would be to stringify an integer to come up.
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.
comment on string/integer
} | ||
|
||
// try get token id for uid 0 - if call fails, we know this didn't support premint | ||
try ERC1155DelegationStorageV1(contractAddress).delegatedTokenId(uint32(0)) returns (uint256) { |
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.
are we somehow ensuring that the first premint executed on a contract is uid 0?
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.
it doesn't really matter here - this is really just checking if that function exists on the contract. even if the uid is not 0, this will return 0. It will revert if the function doesn't exist on the contract
4d8f817
to
b13aecc
Compare
9a2a7de
to
03dd79a
Compare
try ERC1155DelegationStorageV1(contractAddress).delegatedTokenId(uint32(0)) returns (uint256) { | ||
return "1"; | ||
} catch { | ||
return "0"; |
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.
should we return empty string here?
b13aecc
to
987a31f
Compare
03dd79a
to
581167d
Compare
987a31f
to
13bec21
Compare
b9d5595
to
9602e4e
Compare
73aff5e
to
a0c248c
Compare
9602e4e
to
f69802c
Compare
a0c248c
to
6244493
Compare
f69802c
to
1164900
Compare
6244493
to
9a47b0e
Compare
1164900
to
5d465d3
Compare
9a47b0e
to
b5f3019
Compare
5d465d3
to
388f2d7
Compare
b5f3019
to
24e5de5
Compare
388f2d7
to
26a3e3e
Compare
24e5de5
to
9bc75d9
Compare
Merge activity
|
26a3e3e
to
db0f740
Compare
9bc75d9
to
48830c3
Compare
db0f740
to
bf2eb9d
Compare
This reverts commit d57f2990d9046c7e9f7d29ec2105902b3bb59830.
Added method `IZoraCreator1155PremintExecutor.supportedPremintSignatureVersion(contractAddress)` that tells what version of the premint signature the contract supports, and added corresponding method `ZoraCreator1155Impl.supportedPremintSignatureVersion()` to fetch supported version. If premint not supported, returns 0.
Added method `IZoraCreator1155PremintExecutor.supportedPremintSignatureVersion(contractAddress)` that tells what version of the premint signature the contract supports, and added corresponding method `ZoraCreator1155Impl.supportedPremintSignatureVersion()` to fetch supported version. If premint not supported, returns 0.
Added method `IZoraCreator1155PremintExecutor.supportedPremintSignatureVersion(contractAddress)` that tells what version of the premint signature the contract supports, and added corresponding method `ZoraCreator1155Impl.supportedPremintSignatureVersion()` to fetch supported version. If premint not supported, returns 0.
Added method
IZoraCreator1155PremintExecutor.supportedPremintSignatureVersion(contractAddress)
that tells what version of the premint signature the contract supports, and added corresponding methodZoraCreator1155Impl.supportedPremintSignatureVersion()
to fetch supported version. If premint not supported, returns 0.