Skip to content

Instantly share code, notes, and snippets.

@mcgingras
Created March 5, 2021 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcgingras/3e3bf7e2b215a8e7d9020f6636bc1d93 to your computer and use it in GitHub Desktop.
Save mcgingras/3e3bf7e2b215a8e7d9020f6636bc1d93 to your computer and use it in GitHub Desktop.
Someone Else Mint This NFT
// psuedocode baby
validator = 0xabcd....
function mint(msg, attributes) {
signer = decode(msg, attributes)
require(signer === validator)
mintNFT(attributes)
}
How it works
we sign a message with F(public key, private key, attributes)
message is validated with F(Signature, attributes)
if the validated message address the same as the defined validator, were good to go!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment