Skip to content

Conversation

@xenoliss
Copy link

MCM improvements: execute fixes and EIP-712 signatures

Changes

  • Fixed Execute instruction to reload accounts after CPI
  • Added EIP-712 typed structured data hashing support (non-breaking)
  • New instruction set_root_eip712() for EIP-712 signature verification
  • Refactored set_root() logic into set_root_internal() helper

Execute instruction fix

The Execute instruction now reloads accounts after performing the CPI. This prevents Anchor from writing back stale outer copies if the CPI modified any accounts in the outer context.

EIP-712 signature support

Added EIP-712 typed structured data hashing alongside the existing Ethereum Personal Sign format. Both formats work in parallel, allowing users to choose which one to use.

EIP-712 Structure:

Domain: EIP712Domain(string name, string version, uint256 chainId, bytes32 salt)

  • name: "ManyChainMultiSig"
  • version: "1"
  • chainId: Solana chain identifier
  • salt: MCM Program ID (32 bytes)

Message: RootValidation(bytes32 root, uint32 validUntil)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant