Signature
HOT uses an EIP 712 signature scheme. The signature verification is done through the isValidSignatureNow
function in the Open Zeppellin SignatureChecker
library.
To construct a valid signature the typehash and the domain separator are needed, both of which can be calculated offchain or retrieved from onchain public functions in the smart contract. A working foundry example is provided below:
The complete work-flow of a HOT swap can be found in the scripts/SepoliaHOTSwap.s.sol
file.
Last updated