Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/InjectiveLabs/peggo into …
Browse files Browse the repository at this point in the history
…release-prod
  • Loading branch information
nhannamsiu committed Jan 20, 2022
2 parents 5207f52 + db2a8e3 commit c0cb909
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orchestrator/ethereum/committer/eth_committer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions solidity/subgraph/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type Deposit @entity {
sender: Bytes!
destination: String!
amount: BigInt!
eventNonce: Int!
timestamp: Int!
blockHeight: Int!
}
Expand All @@ -36,6 +37,7 @@ type Withdrawal @entity {
destination: String!
fee: BigInt!
tokenContract: Bytes!
eventNonce: Int!
timestamp: Int!
blockHeight: Int!
}
Expand Down
2 changes: 2 additions & 0 deletions solidity/subgraph/src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit c0cb909

Please sign in to comment.