βœ…Signature

Signature

Setup

Test file:

Public key and private key

Private key is just a random uint256. To compute public key from private key, use vm.addr():

vm.sign()

Prepare a message and sign it using vm.sign(), which returns the (v, r, s) tuple:

Testing a failed case:

Last updated

Was this helpful?