mirror of
https://github.com/luxfi/teleport.git
synced 2026-10-30 15:15:49 +00:00
Solidity library computing D = keccak256("LUX-WARP-ZAP-CORE-v1" || core), the
canonical Warp ZAP message digest, byte-for-byte identical to the Go reference
(luxfi/warp message.go marshalZAP + teleport/payload.go ComputeMessageHash).
core = 0x01||u32(networkId)||srcChain32||0x0(32)||u64(0)||u64(0)||u32(11)
"Pulsar-SHA3"||u32(90)||payload; payload(90)=u8(3)||u64(dest)||token(20)||
u256(amount)||recip(20)||u8(vaultIsZero)||u64(nonce). Proven against all 5
luxfi/warp sol_compatible fixtures via forge (test/forge/WarpZapDigest.t.sol,
foundry.toml scoped to the lib so it coexists with the Hardhat/OZ suite).
This is the on-chain half of the warp RLP->ZAP lockstep; BridgeV2.burn/claim
wire to it next (+ Envelope source-lineage fields).