Skip to content

Commit

Permalink
chore: add gateway contract TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth committed Mar 7, 2024
1 parent 472f8d8 commit 0802231
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/axelar-gateway/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,20 @@ impl AxelarGatewayInterface for AxelarGateway {
&env.storage().instance().get(&DataKey::AuthModule).unwrap(),
);

// AxelarAuthVerifierInterface::validate_proof(env, batch_hash, proof)

let valid = auth_module.validate_proof(&batch_hash, &proof);
if !valid {
return Err(Error::InvalidProof);
}

// TODO: switch to new domain separation approach
if batch.chain_id != 1 {
return Err(Error::InvalidChainId);
}

for (command_id, command) in batch.commands {
let key = Self::command_executed_key(command_id.clone());

// TODO: switch to full revert, or add allow selecting subset of commands to process
// Skip command if already executed. This allows batches to be processed partially.
if env.storage().persistent().has(&key) {
continue;
Expand Down

0 comments on commit 0802231

Please sign in to comment.