Skip to main content
This guide shows how to form EIP-712 hashes for instruction activation and deactivation in TypeScript. As long as you have the Action ABI, you can form the activation hash like this:
For deactivation, it’s even simpler since we just need the instruction ID:
That’s it! The key is having the correct ABI structure, which matches what’s defined in the Instruction.sol contract. In order to swap out the actionAbi for the Action you want to activate, look at the hash function in the Action’s contract ABI. For example, from the RefuelERC20 Action’s ABI:
This shows us exactly how to structure the arguments for that Action. The rest of the ABI (constructor, other functions, errors) isn’t needed for forming the EIP-712 hash. For a complete reference of all Action ABIs, see Action Hash ABIs.