Skip to content

Commit

Permalink
[Spec] Add error code for already existing nonce in initialisation.
Browse files Browse the repository at this point in the history
see #116
  • Loading branch information
franck44 committed Dec 20, 2024
1 parent 08025b6 commit 162923a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module aptos_framework::native_bridge {
const EINCORRECT_NONCE: u64 = 9;
const EID_NOT_FOUND: u64 = 10;
const EINVALID_BRIDGE_RELAYER: u64 = 11;
const ENONCE_ALREADY_EXISTS_IN_INIT: u64 = 12;
const ESAME_FEE: u64 = 0x2;

friend aptos_framework::genesis;
Expand Down Expand Up @@ -266,7 +267,7 @@ module aptos_framework::native_bridge {
// Ensure the nonce is not already initialized
assert!(
!exists<Nonce>(signer::address_of(aptos_framework)),
2
ENONCE_ALREADY_EXISTS_IN_INIT
);

// Create the Nonce resource with an initial value of 0
Expand Down

0 comments on commit 162923a

Please sign in to comment.