ERC-1271
Allow smart contracts signage
Last updated
Allow smart contracts signage
Last updated
ERC-1271, which allows for on-chain signature verification for Smart Contracts (since contracts do no have private keys).
The verifying contract would get passed in the 32-byte hash that it wants to verify along with an implementation dependant byte array - domain seperator.
We expect a return of the bytes4 magic value 0x1626ba7e
when function passes.
signer contract(multi-sig) must implement isValidSignature
and return the magicValue
up to the contract to implement the logic of what determines a valid signature
if its multi-sig: could be concatentation of the various users' signatures
It's essential to understand that you never will be able to sign with your smart contract account. Only we will create a system to delegate the signature to another account in the name of your smart contract.
For example we would have to incorporate the following:
It is established in the standard that in case of success, the function must return the value 0x1626ba7e
This is not a random value. It is the signature of the function isValidSignature(bytes32,bytes)