From 5159e144817f153f2cfa59d4569df96d83aac061 Mon Sep 17 00:00:00 2001 From: Jorge Sanmiguel <8038323+jsanmigimeno@users.noreply.github.com> Date: Thu, 2 May 2024 13:19:52 +0000 Subject: [PATCH] feat: Update contract abis --- abis/IMessageEscrowEvents.json | 907 +++++++++++++++++++++++++++- abis/IncentivizedMessageEscrow.json | 93 ++- src/getter/getter.worker.ts | 2 +- 3 files changed, 996 insertions(+), 6 deletions(-) diff --git a/abis/IMessageEscrowEvents.json b/abis/IMessageEscrowEvents.json index 3041d70..85f11dc 100644 --- a/abis/IMessageEscrowEvents.json +++ b/abis/IMessageEscrowEvents.json @@ -1,10 +1,597 @@ [ + { + "type": "constructor", + "inputs": [ + { + "name": "sendLostGasTo", + "type": "address", + "internalType": "address" + }, + { + "name": "uniqueChainIndex", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "signer", + "type": "address", + "internalType": "address" + }, + { + "name": "costOfMessages_", + "type": "uint128", + "internalType": "uint128" + }, + { + "name": "proofPeriod", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "MESSAGE_REVERTED", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes1", + "internalType": "bytes1" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MESSAGE_TIMED_OUT", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes1", + "internalType": "bytes1" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "NO_AUTHENTICATION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes1", + "internalType": "bytes1" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SEND_LOST_GAS_TO", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UNIQUE_SOURCE_IDENTIFIER", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "acceptOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "accumulator", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint128", + "internalType": "uint128" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "bounty", + "inputs": [ + { + "name": "messageIdentifier", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "incentive", + "type": "tuple", + "internalType": "struct IMessageEscrowStructs.IncentiveDescription", + "components": [ + { + "name": "maxGasDelivery", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "maxGasAck", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "refundGasTo", + "type": "address", + "internalType": "address" + }, + { + "name": "priceOfDeliveryGas", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "priceOfAckGas", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "targetDelta", + "type": "uint64", + "internalType": "uint64" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "collectPayments", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "convertEVMTo65", + "inputs": [ + { + "name": "evmAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "estimateAdditionalCost", + "inputs": [], + "outputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "implementationAddress", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "implementationAddressHash", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "increaseBounty", + "inputs": [ + { + "name": "messageIdentifier", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "deliveryGasPriceIncrease", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "ackGasPriceIncrease", + "type": "uint96", + "internalType": "uint96" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "messageDelivered", + "inputs": [ + { + "name": "sourceIdentifier", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sourceImplementationIdentifier", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "messageIdentifier", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "hasMessageBeenExecuted", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pendingOwner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "processPacket", + "inputs": [ + { + "name": "messagingProtocolContext", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "rawMessage", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "feeRecipient", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "proofValidPeriod", + "inputs": [ + { + "name": "destinationIdentifier", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "timestamp", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "recoverAck", + "inputs": [ + { + "name": "messagingProtocolContext", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "rawMessage", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "reemitAckMessage", + "inputs": [ + { + "name": "sourceIdentifier", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "implementationIdentifier", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "receiveAckWithContext", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRemoteImplementation", + "inputs": [ + { + "name": "destinationIdentifier", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "implementation", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "submitMessage", + "inputs": [ + { + "name": "destinationIdentifier", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "destinationAddress", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "incentive", + "type": "tuple", + "internalType": "struct IMessageEscrowStructs.IncentiveDescription", + "components": [ + { + "name": "maxGasDelivery", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "maxGasAck", + "type": "uint48", + "internalType": "uint48" + }, + { + "name": "refundGasTo", + "type": "address", + "internalType": "address" + }, + { + "name": "priceOfDeliveryGas", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "priceOfAckGas", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "targetDelta", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "name": "deadline", + "type": "uint64", + "internalType": "uint64" + } + ], + "outputs": [ + { + "name": "gasRefund", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "messageIdentifier", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "thisBytes65", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "timeoutMessage", + "inputs": [ + { + "name": "sourceIdentifier", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "implementationIdentifier", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "originBlockNumber", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "message", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, { "type": "event", "name": "BountyClaimed", "inputs": [ { - "name": "uniqueIdentifier", + "name": "destinationImplementation", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "messageIdentifier", "type": "bytes32", "indexed": true, "internalType": "bytes32" @@ -65,6 +652,18 @@ "type": "event", "name": "BountyPlaced", "inputs": [ + { + "name": "destinationImplementation", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, { "name": "messageIdentifier", "type": "bytes32", @@ -112,10 +711,47 @@ ], "anonymous": false }, + { + "type": "event", + "name": "Message", + "inputs": [ + { + "name": "destinationIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "recipient", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "message", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, { "type": "event", "name": "MessageAcked", "inputs": [ + { + "name": "destinationImplementation", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, { "name": "messageIdentifier", "type": "bytes32", @@ -129,6 +765,18 @@ "type": "event", "name": "MessageDelivered", "inputs": [ + { + "name": "sourceImplementation", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, { "name": "messageIdentifier", "type": "bytes32", @@ -140,8 +788,20 @@ }, { "type": "event", - "name": "MessageTimedout", + "name": "MessageTimedOut", "inputs": [ + { + "name": "destinationImplementation", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, { "name": "messageIdentifier", "type": "bytes32", @@ -151,6 +811,44 @@ ], "anonymous": false }, + { + "type": "event", + "name": "OwnershipTransferStarted", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, { "type": "event", "name": "RemoteImplementationSet", @@ -186,6 +884,18 @@ "type": "event", "name": "TimeoutInitiated", "inputs": [ + { + "name": "sourceImplementation", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, { "name": "messageIdentifier", "type": "bytes32", @@ -194,5 +904,198 @@ } ], "anonymous": false + }, + { + "type": "error", + "name": "AckHasNotBeenExecuted", + "inputs": [] + }, + { + "type": "error", + "name": "CannotRetryWrongMessage", + "inputs": [ + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "DeadlineInPast", + "inputs": [ + { + "name": "blocktimestamp", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "actual", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "DeadlineNotPassed", + "inputs": [ + { + "name": "expected", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "actual", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "DeadlineTooLong", + "inputs": [ + { + "name": "maxAllowed", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "actual", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "ImplementationAddressAlreadySet", + "inputs": [ + { + "name": "currentImplementation", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "IncorrectValueProvided", + "inputs": [ + { + "name": "expected", + "type": "uint128", + "internalType": "uint128" + }, + { + "name": "actual", + "type": "uint128", + "internalType": "uint128" + } + ] + }, + { + "type": "error", + "name": "InvalidBytes65Address", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidImplementationAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidSigner", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidTimeoutPackage", + "inputs": [ + { + "name": "expected", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "actual", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "MessageAlreadyAcked", + "inputs": [] + }, + { + "type": "error", + "name": "MessageAlreadyBountied", + "inputs": [] + }, + { + "type": "error", + "name": "MessageAlreadyProcessed", + "inputs": [] + }, + { + "type": "error", + "name": "MessageAlreadySpent", + "inputs": [] + }, + { + "type": "error", + "name": "MessageDoesNotExist", + "inputs": [] + }, + { + "type": "error", + "name": "MessageHasInvalidContext", + "inputs": [] + }, + { + "type": "error", + "name": "NoImplementationAddressSet", + "inputs": [] + }, + { + "type": "error", + "name": "NotEnoughGasExecution", + "inputs": [] + }, + { + "type": "error", + "name": "NotEnoughGasProvided", + "inputs": [ + { + "name": "expected", + "type": "uint128", + "internalType": "uint128" + }, + { + "name": "actual", + "type": "uint128", + "internalType": "uint128" + } + ] + }, + { + "type": "error", + "name": "NotImplementedError", + "inputs": [] + }, + { + "type": "error", + "name": "RefundGasToIsZero", + "inputs": [] } ] \ No newline at end of file diff --git a/abis/IncentivizedMessageEscrow.json b/abis/IncentivizedMessageEscrow.json index 856b697..b3cbdb0 100644 --- a/abis/IncentivizedMessageEscrow.json +++ b/abis/IncentivizedMessageEscrow.json @@ -214,6 +214,16 @@ "type": "function", "name": "messageDelivered", "inputs": [ + { + "name": "sourceIdentifier", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sourceImplementationIdentifier", + "type": "bytes", + "internalType": "bytes" + }, { "name": "messageIdentifier", "type": "bytes32", @@ -452,7 +462,19 @@ "name": "BountyClaimed", "inputs": [ { - "name": "uniqueIdentifier", + "name": "destinationImplementation", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "messageIdentifier", "type": "bytes32", "indexed": true, "internalType": "bytes32" @@ -513,6 +535,18 @@ "type": "event", "name": "BountyPlaced", "inputs": [ + { + "name": "destinationImplementation", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, { "name": "messageIdentifier", "type": "bytes32", @@ -564,6 +598,18 @@ "type": "event", "name": "MessageAcked", "inputs": [ + { + "name": "destinationImplementation", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, { "name": "messageIdentifier", "type": "bytes32", @@ -577,6 +623,18 @@ "type": "event", "name": "MessageDelivered", "inputs": [ + { + "name": "sourceImplementation", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, { "name": "messageIdentifier", "type": "bytes32", @@ -588,8 +646,20 @@ }, { "type": "event", - "name": "MessageTimedout", + "name": "MessageTimedOut", "inputs": [ + { + "name": "destinationImplementation", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, { "name": "messageIdentifier", "type": "bytes32", @@ -634,6 +704,18 @@ "type": "event", "name": "TimeoutInitiated", "inputs": [ + { + "name": "sourceImplementation", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "chainIdentifier", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, { "name": "messageIdentifier", "type": "bytes32", @@ -790,6 +872,11 @@ "name": "MessageDoesNotExist", "inputs": [] }, + { + "type": "error", + "name": "MessageHasInvalidContext", + "inputs": [] + }, { "type": "error", "name": "NoImplementationAddressSet", @@ -797,7 +884,7 @@ }, { "type": "error", - "name": "NotEnoughGasExeuction", + "name": "NotEnoughGasExecution", "inputs": [] }, { diff --git a/src/getter/getter.worker.ts b/src/getter/getter.worker.ts index 944a8de..75b6c08 100644 --- a/src/getter/getter.worker.ts +++ b/src/getter/getter.worker.ts @@ -285,7 +285,7 @@ class GetterWorker { const event = parsedLog.args as unknown as BountyClaimedEvent.OutputObject; - const messageIdentifier = event.uniqueIdentifier; + const messageIdentifier = event.messageIdentifier; this.logger.info({ messageIdentifier }, `BountyClaimed event found.`);