axelarnetwork / axelar-amplifier

Permissionless Connections Service run on the Axelar Network
21 stars 24 forks source link

fix(ampd): fix nonce for multiversx being keccak256 hash instead of created at #593

Closed raress96 closed 2 months ago

raress96 commented 2 months ago

Because of a confusion of types from the AxelarAmplifierGateway contract (see here), we assumed that the nonce should be a keccak256 hash.

Instead, for both the EVM and Sui implementations, it is the created_at date (u64) represented as a uint256. Both keccak256 & uint256 have the same 32 byte length, hence the confusion.

The only other place that needs updating is our multisig contract, which we will also handle.

This will also simplify the Relayer implementation, since previously it was not possible for us to go from the keccak256 hash back to the created_at date, which is needed for the verify_verifier_set call on the Voting Verifier.