diff --git a/orchestrator/ethereum/committer/eth_committer.go b/orchestrator/ethereum/committer/eth_committer.go index a9b3958a..57c54272 100644 --- a/orchestrator/ethereum/committer/eth_committer.go +++ b/orchestrator/ethereum/committer/eth_committer.go @@ -160,8 +160,8 @@ func (e *ethCommitter) SendTx( err := errors.New("failed to sign transaction") e.nonceCache.Incr(e.fromAddress) return err - case strings.Contains(err.Error(), "nonce is too low"), - strings.Contains(err.Error(), "nonce is too high"), + case strings.Contains(err.Error(), "nonce too low"), + strings.Contains(err.Error(), "nonce too high"), strings.Contains(err.Error(), "the tx doesn't have the correct nonce"): if resyncUsed { diff --git a/solidity/subgraph/schema.graphql b/solidity/subgraph/schema.graphql index 31ea98ae..5f2b20f4 100644 --- a/solidity/subgraph/schema.graphql +++ b/solidity/subgraph/schema.graphql @@ -13,6 +13,7 @@ type Deposit @entity { sender: Bytes! destination: String! amount: BigInt! + eventNonce: Int! timestamp: Int! blockHeight: Int! } @@ -36,6 +37,7 @@ type Withdrawal @entity { destination: String! fee: BigInt! tokenContract: Bytes! + eventNonce: Int! timestamp: Int! blockHeight: Int! } diff --git a/solidity/subgraph/src/mapping.ts b/solidity/subgraph/src/mapping.ts index ff5e6052..3447d8c4 100644 --- a/solidity/subgraph/src/mapping.ts +++ b/solidity/subgraph/src/mapping.ts @@ -155,6 +155,7 @@ export function handleSendToCosmosEvent(event: SendToCosmosEvent): void { deposit.amount = event.params._amount; deposit.destination = getInjectiveAddress(event.params._destination); deposit.sender = event.params._sender; + deposit.eventNonce = event.params._eventNonce.toI32(); deposit.timestamp = event.block.timestamp.toI32(); deposit.blockHeight = event.block.number.toI32(); @@ -267,6 +268,7 @@ export function handleSubmitBatch(call: SubmitBatchCall): void { ); withdrawal.fee = fees[i]; withdrawal.tokenContract = call.inputs._tokenContract; + withdrawal.eventNonce = call.inputs._batchNonce.toI32(); withdrawal.timestamp = call.block.timestamp.toI32(); withdrawal.blockHeight = call.block.number.toI32();