diff --git a/Errors.md b/Errors.md index 018c142e..e374a824 100644 --- a/Errors.md +++ b/Errors.md @@ -8,28 +8,21 @@ ## interfaces/IWatcherPrecompile.sol -| Error | Signature | -| --------------------------- | ------------ | -| `InvalidChainSlug()` | `0xbff6b106` | -| `InvalidConnection()` | `0x63228f29` | -| `InvalidTransmitter()` | `0x58a70a0a` | -| `InvalidTimeoutRequest()` | `0x600ca372` | -| `InvalidPayloadId()` | `0xfa0b8c86` | -| `InvalidCaller()` | `0x48f5c3ed` | -| `InvalidGateway()` | `0xfc9dfe85` | -| `InvalidSwitchboard()` | `0xf63c9e4d` | -| `RequestAlreadyCancelled()` | `0xc70f47d8` | -| `RequestCancelled()` | `0xe3cf2258` | -| `AlreadyStarted()` | `0x1fbde445` | -| `InvalidLevelNumber()` | `0x5022f14b` | - -## interfaces/IWatcherPrecompileLimits.sol - -| Error | Signature | -| ------------------------------------------------ | ------------ | -| `ActionNotSupported(address,bytes32)` | `0xa219158f` | -| `NotDeliveryHelper()` | `0x29029c67` | -| `LimitExceeded(address,bytes32,uint256,uint256)` | `0x80bb2621` | +| Error | Signature | +| ------------------------------------- | ------------ | +| `InvalidChainSlug()` | `0xbff6b106` | +| `InvalidConnection()` | `0x63228f29` | +| `InvalidTimeoutRequest()` | `0x600ca372` | +| `InvalidPayloadId()` | `0xfa0b8c86` | +| `InvalidCaller()` | `0x48f5c3ed` | +| `InvalidGateway()` | `0xfc9dfe85` | +| `InvalidSwitchboard()` | `0xf63c9e4d` | +| `RequestAlreadyCancelled()` | `0xc70f47d8` | +| `RequestCancelled()` | `0xe3cf2258` | +| `AlreadyStarted()` | `0x1fbde445` | +| `RequestNotProcessing()` | `0x07ba8aaa` | +| `InvalidLevelNumber()` | `0x5022f14b` | +| `DeadlineNotPassedForOnChainRevert()` | `0x7006aa10` | ## protocol/AddressResolver.sol @@ -46,12 +39,6 @@ | `PromiseAlreadySetUp()` | `0x927c53d5` | | `PromiseRevertFailed()` | `0x0175b9de` | -## protocol/Forwarder.sol - -| Error | Signature | -| ------------------------ | ------------ | -| `AsyncModifierNotUsed()` | `0xb9521e1a` | - ## protocol/payload-delivery/AuctionManager.sol | Error | Signature | @@ -61,44 +48,50 @@ ## protocol/payload-delivery/ContractFactoryPlug.sol -| Error | Signature | -| ------------------------- | ------------ | -| `DeploymentFailed()` | `0x30116425` | -| `ExecutionFailed()` | `0xacfdb444` | -| `information(bool,bytes)` | `0x1a5c6d63` | +| Error | Signature | +| -------------------------- | ------------ | +| `DeploymentFailed()` | `0x30116425` | +| `ExecutionFailed()` | `0xacfdb444` | +| `information(bool,,bytes)` | `0x3a82a1f3` | ## protocol/payload-delivery/FeesManager.sol -| Error | Signature | -| ----------------------------- | ------------ | -| `InsufficientFeesAvailable()` | `0x51488f54` | -| `NoFeesForTransmitter()` | `0x248bac55` | -| `NoFeesBlocked()` | `0x116d68f9` | -| `InvalidWatcherSignature()` | `0x5029f14f` | -| `NonceUsed()` | `0x1f6d5aef` | -| `InvalidCaller()` | `0x48f5c3ed` | +| Error | Signature | +| -------------------------------- | ------------ | +| `InsufficientCreditsAvailable()` | `0xe61dc0aa` | +| `NoFeesForTransmitter()` | `0x248bac55` | +| `NoCreditsBlocked()` | `0xada9eb4c` | +| `InvalidCaller()` | `0x48f5c3ed` | +| `InvalidUserSignature()` | `0xe3fb657c` | +| `AppGatewayNotWhitelisted()` | `0x84e5309f` | +| `InvalidAmount()` | `0x2c5211c6` | +| `InsufficientBalance()` | `0xf4d678b8` | ## protocol/payload-delivery/FeesPlug.sol -| Error | Signature | -| ----------------------------------- | ------------ | -| `FeesAlreadyPaid()` | `0xd3b1ad69` | -| `InsufficientTokenBalance(address)` | `0x642faafa` | -| `InvalidDepositAmount()` | `0xfe9ba5cd` | -| `TokenNotWhitelisted(address)` | `0xea3bff2e` | +| Error | Signature | +| --------------------------------------------------- | ------------ | +| `InsufficientTokenBalance(address,uint256,uint256)` | `0xebd6ced9` | +| `InvalidDepositAmount()` | `0xfe9ba5cd` | +| `TokenNotWhitelisted(address)` | `0xea3bff2e` | ## protocol/payload-delivery/app-gateway/DeliveryUtils.sol -| Error | Signature | -| ----------------------- | ------------ | -| `AllPayloadsExecuted()` | `0x6bc43bfe` | -| `NotFromForwarder()` | `0xe83aa6bd` | -| `CallFailed(bytes32)` | `0xe22e3683` | -| `PayloadTooLarge()` | `0x492f620d` | -| `OnlyAppGateway()` | `0xfec944ea` | -| `WinningBidExists()` | `0xe8733654` | -| `InsufficientFees()` | `0x8d53e553` | -| `ReadOnlyRequests()` | `0x5f16b0e6` | +| Error | Signature | +| ------------------------------------ | ------------ | +| `PayloadTooLarge()` | `0x492f620d` | +| `OnlyAppGateway()` | `0xfec944ea` | +| `WinningBidExists()` | `0xe8733654` | +| `InsufficientFees()` | `0x8d53e553` | +| `ReadOnlyRequests()` | `0x5f16b0e6` | +| `RequestPayloadCountLimitExceeded()` | `0xcbef144b` | +| `MaxMsgValueLimitExceeded()` | `0x97b4e8ce` | + +## protocol/payload-delivery/app-gateway/FeesHelpers.sol + +| Error | Signature | +| --------------------------------------------- | ------------ | +| `NewMaxFeesLowerThanCurrent(uint256,uint256)` | `0x1345dda1` | ## protocol/socket/Socket.sol @@ -109,6 +102,8 @@ | `LowGasLimit()` | `0xd38edae0` | | `InvalidSlug()` | `0x290a8315` | | `DeadlinePassed()` | `0x70f65caa` | +| `InsufficientMsgValue()` | `0x78f38f76` | +| `ReadOnlyCall()` | `0xcf8fd6f1` | ## protocol/socket/SocketConfig.sol @@ -119,11 +114,12 @@ | `SwitchboardExists()` | `0x2dff8555` | | `SwitchboardExistsOrDisabled()` | `0x1c7d2487` | -## protocol/socket/SocketUtils.sol +## protocol/socket/SocketFeeManager.sol -| Error | Signature | -| ---------------------- | ------------ | -| `InvalidTransmitter()` | `0x58a70a0a` | +| Error | Signature | +| -------------------- | ------------ | +| `InsufficientFees()` | `0x8d53e553` | +| `FeeTooLow()` | `0x732f9413` | ## protocol/socket/switchboard/FastSwitchboard.sol @@ -132,12 +128,6 @@ | `AlreadyAttested()` | `0x35d90805` | | `WatcherNotFound()` | `0xa278e4ad` | -## protocol/socket/switchboard/SwitchboardBase.sol - -| Error | Signature | -| ---------------- | ------------ | -| `InvalidNonce()` | `0x756688fe` | - ## protocol/utils/AccessControl.sol | Error | Signature | @@ -156,17 +146,8 @@ | Error | Signature | | ---------------------------- | ------------ | -| `NotAuthorized()` | `0xea8e4eb5` | -| `NotBridge()` | `0x7fea9dc5` | | `NotSocket()` | `0xc59f8f7c` | -| `ConnectorUnavailable()` | `0xb1efb84a` | -| `InvalidTokenContract()` | `0x29bdfb34` | -| `ZeroAddressReceiver()` | `0x96bbcf1e` | | `ZeroAddress()` | `0xd92e233d` | -| `ZeroAmount()` | `0x1f2a2005` | -| `InsufficientFunds()` | `0x356680b7` | -| `InvalidSigner()` | `0x815e1d64` | -| `InvalidFunction()` | `0xdb2079c3` | | `TimeoutDelayTooLarge()` | `0xc10bfe64` | | `TimeoutAlreadyResolved()` | `0x7dc8be06` | | `ResolvingTimeoutTooEarly()` | `0x28fd4c50` | @@ -174,13 +155,13 @@ | `FeesAlreadyPaid()` | `0xd3b1ad69` | | `NotAuctionManager()` | `0x87944c26` | | `CallFailed()` | `0x3204506f` | -| `PlugDisconnected()` | `0xe741bafb` | +| `PlugNotFound()` | `0x5f1ac76a` | | `InvalidAppGateway()` | `0x82ded261` | | `AppGatewayAlreadyCalled()` | `0xb224683f` | | `InvalidInboxCaller()` | `0x4f1aa61e` | +| `InvalidCallerTriggered()` | `0x3292d247` | | `PromisesNotResolved()` | `0xb91dbe7d` | | `InvalidPromise()` | `0x45f2d176` | -| `InvalidIndex()` | `0x63df8171` | | `InvalidTransmitter()` | `0x58a70a0a` | | `FeesNotSet()` | `0x2a831034` | | `InvalidTokenAddress()` | `0x1eb00b06` | @@ -191,12 +172,22 @@ | `BidExceedsMaxFees()` | `0x4c923f3c` | | `LowerBidAlreadyExists()` | `0xaaa1f709` | | `AsyncModifierNotUsed()` | `0xb9521e1a` | +| `InvalidIndex()` | `0x63df8171` | +| `RequestAlreadyExecuted()` | `0xd6f1f946` | +| `NoAsyncPromiseFound()` | `0xa2928f68` | +| `PromiseCallerMismatch()` | `0x2b87f115` | +| `RequestCountMismatch()` | `0x98bbcbff` | +| `DeliveryHelperNotSet()` | `0x07e6c946` | ## protocol/watcherPrecompile/WatcherPrecompileConfig.sol -| Error | Signature | -| --------------------------- | ------------ | -| `InvalidGateway()` | `0xfc9dfe85` | -| `InvalidSwitchboard()` | `0xf63c9e4d` | -| `NonceUsed()` | `0x1f6d5aef` | -| `InvalidWatcherSignature()` | `0x5029f14f` | +| Error | Signature | +| ---------------------- | ------------ | +| `InvalidGateway()` | `0xfc9dfe85` | +| `InvalidSwitchboard()` | `0xf63c9e4d` | + +## protocol/watcherPrecompile/WatcherPrecompileLimits.sol + +| Error | Signature | +| ---------------------------- | ------------ | +| `WatcherFeesNotSet(bytes32)` | `0x1ce1de3f` | diff --git a/EventTopics.md b/EventTopics.md index 28b83f5a..ada88250 100644 --- a/EventTopics.md +++ b/EventTopics.md @@ -8,19 +8,31 @@ | `Deployed` | `(proxy: address, implementation: address, admin: address)` | `0xc95935a66d15e0da5e412aca0ad27ae891d20b2fb91cf3994b6a3bf2b8178082` | | `Upgraded` | `(proxy: address, implementation: address)` | `0x5d611f318680d00598bb735d61bacf0c514c6b50e1e5ad30040a4df2b12791c7` | +## TestUSDC + +| Event | Arguments | Topic | +| ---------- | ----------------------------------------------------- | -------------------------------------------------------------------- | +| `Approval` | `(owner: address, spender: address, amount: uint256)` | `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925` | +| `Transfer` | `(from: address, to: address, amount: uint256)` | `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef` | + ## AddressResolver -| Event | Arguments | Topic | -| ---------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------- | -| `AddressSet` | `(name: bytes32, oldAddress: address, newAddress: address)` | `0x9ef0e8c8e52743bb38b83b17d9429141d494b8041ca6d616a6c77cebae9cd8b7` | -| `AsyncPromiseDeployed` | `(newAsyncPromise: address, salt: bytes32)` | `0xb6c5491cf83e09749b1a4dd6a9f07b0e925fcb0a915ac8c2b40e8ab28191c270` | -| `ForwarderDeployed` | `(newForwarder: address, salt: bytes32)` | `0x4dbbecb9cf9c8b93da9743a2b48ea52efe68d69230ab1c1b711891d9d223b29f` | -| `ImplementationUpdated` | `(contractName: string, newImplementation: address)` | `0xa1e41aa2c2f3f20d9b63ac06b634d2788768d6034f3d9192cdf7d07374bb16f4` | -| `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | -| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | -| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | -| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | -| `PlugAdded` | `(appGateway: address, chainSlug: uint32, plug: address)` | `0x2cb8d865028f9abf3dc064724043264907615fadc8615a3699a85edb66472273` | +| Event | Arguments | Topic | +| ------------------------------ | ----------------------------------------------------------- | -------------------------------------------------------------------- | +| `AddressSet` | `(name: bytes32, oldAddress: address, newAddress: address)` | `0x9ef0e8c8e52743bb38b83b17d9429141d494b8041ca6d616a6c77cebae9cd8b7` | +| `AsyncPromiseDeployed` | `(newAsyncPromise: address, salt: bytes32)` | `0xb6c5491cf83e09749b1a4dd6a9f07b0e925fcb0a915ac8c2b40e8ab28191c270` | +| `ContractsToGatewaysUpdated` | `(contractAddress_: address, appGateway_: address)` | `0xb870bb0c6b5ea24214ae6c653af6c2a8b6240d5838f82132703ee5c069b14b4c` | +| `DefaultAuctionManagerUpdated` | `(defaultAuctionManager_: address)` | `0x60f296739208a505ead7fb622df0f76b7791b824481b120a2300bdaf85e3e3d6` | +| `DeliveryHelperUpdated` | `(deliveryHelper_: address)` | `0xc792471d30bbabcf9dc9fdba5bfa74f8872ff3c28f6e65e122bdb82a71b83c1c` | +| `FeesManagerUpdated` | `(feesManager_: address)` | `0x94e67aa1341a65767dfde81e62fd265bfbade1f5744bfd3cd73f99a6eca0572a` | +| `ForwarderDeployed` | `(newForwarder: address, salt: bytes32)` | `0x4dbbecb9cf9c8b93da9743a2b48ea52efe68d69230ab1c1b711891d9d223b29f` | +| `ImplementationUpdated` | `(contractName: string, newImplementation: address)` | `0xa1e41aa2c2f3f20d9b63ac06b634d2788768d6034f3d9192cdf7d07374bb16f4` | +| `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | +| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | +| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | +| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | +| `PlugAdded` | `(appGateway: address, chainSlug: uint32, plug: address)` | `0x2cb8d865028f9abf3dc064724043264907615fadc8615a3699a85edb66472273` | +| `WatcherPrecompileUpdated` | `(watcherPrecompile_: address)` | `0xb00972c0b5c3d3d9ddc6d6a6db612abeb109653a3424d5d972510fa20bff4972` | ## AsyncPromise @@ -38,10 +50,11 @@ | Event | Arguments | Topic | | ---------------------------- | ------------------------------------------- | -------------------------------------------------------------------- | -| `AuctionEnded` | `(requestCount: uint40, winningBid: tuple)` | `0x9cc96c8b9e588c26f8beae57fe7fbb59113b82865578b54ff3f025317dcd6895` | +| `AuctionEndDelaySecondsSet` | `(auctionEndDelaySeconds: uint256)` | `0xf38f0d9dc8459cf5426728c250d115196a4c065ebc1a6c29da24764a8c0da722` | +| `AuctionEnded` | `(requestCount: uint40, winningBid: tuple)` | `0xede4ec1efc469fac10dcb4930f70be4cd21f3700ed61c91967c19a7cd7c0d86e` | | `AuctionRestarted` | `(requestCount: uint40)` | `0x071867b21946ec4655665f0d4515d3757a5a52f144c762ecfdfb11e1da542b82` | | `AuctionStarted` | `(requestCount: uint40)` | `0xcd040613cf8ef0cfcaa3af0d711783e827a275fc647c116b74595bf17cb9364f` | -| `BidPlaced` | `(requestCount: uint40, bid: tuple)` | `0xd3dc2f289bc8a88faaaf6a3f4f800dd0eac760a653b067ef749771252a1343b3` | +| `BidPlaced` | `(requestCount: uint40, bid: tuple)` | `0x7f79485e4c9aeea5d4899bc6f7c63b22ac1f4c01d2d28c801e94732fee657b5d` | | `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | | `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | | `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | @@ -63,48 +76,54 @@ ## FeesManager -| Event | Arguments | Topic | -| ---------------------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `FeesBlocked` | `(requestCount: uint40, chainSlug: uint32, token: address, amount: uint256)` | `0xbb23ad39130b455188189b8de52b55fa41a7ea8ee8413dc28ced31e543d0df0c` | -| `FeesDepositedUpdated` | `(chainSlug: uint32, appGateway: address, token: address, amount: uint256)` | `0xe82dece33ef85114446a366b7d94538d641968e3ec87bf9f2f5a957ace1086e7` | -| `FeesUnblocked` | `(requestCount: uint40, appGateway: address)` | `0xc8b27128d97a92b6664c696ac891afaa87c9fc7d7c7cda17d892237589ebd4fc` | -| `FeesUnblockedAndAssigned` | `(requestCount: uint40, transmitter: address, amount: uint256)` | `0x04d2986fb321499f6bc8263ff6e65d823570e186dcdc16c04c6b388ccd0f29a8` | -| `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | -| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | -| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | -| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | -| `TransmitterFeesUpdated` | `(requestCount: uint40, transmitter: address, amount: uint256)` | `0x9839a0f8408a769f0f3bb89025b64a6cff279673c77d2de3ab8d59b1841fcd5f` | +| Event | Arguments | Topic | +| ----------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `CreditsBlocked` | `(requestCount: uint40, consumeFrom: address, amount: uint256)` | `0xf037c15aef41440aa823cf1fdeaea332105d8b23d52557f6670189b5d76f1eed` | +| `CreditsDeposited` | `(chainSlug: uint32, appGateway: address, token: address, amount: uint256)` | `0x7254d040844de2dac4225a23f81bb54acb13d1eadb6e8b369dd251d36a9e8552` | +| `CreditsUnblocked` | `(requestCount: uint40, appGateway: address)` | `0x45db29ef2701319155cac058aa2f56ce1f73e0e238161d3db9f8c9a47655210d` | +| `CreditsUnblockedAndAssigned` | `(requestCount: uint40, transmitter: address, amount: uint256)` | `0x6f3d11270d1df9aff1aa04d1ea7797a3a572586a31437acc415ac853f625050c` | +| `CreditsUnwrapped` | `(consumeFrom: address, amount: uint256)` | `0xdcc9473b722b4c953617ab373840b365298a520bc7f20ce94fa7314f4a857774` | +| `CreditsWrapped` | `(consumeFrom: address, amount: uint256)` | `0x40246503613721eb4acf4020c6c56b6a16e5d08713316db0bea5210e8819c592` | +| `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | +| `InsufficientWatcherPrecompileCreditsAvailable` | `(chainSlug: uint32, token: address, consumeFrom: address)` | `0xd50bc02f94b9ef4a8aff7438da15a69e443956f56b6aa007cf2c584215e87493` | +| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | +| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | +| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | +| `TransmitterCreditsUpdated` | `(requestCount: uint40, transmitter: address, amount: uint256)` | `0x24790626bfbe84d1358ce3e8cb0ff6cfc9eb7ea16e597f43ab607107baf889e3` | +| `WatcherPrecompileCreditsAssigned` | `(amount: uint256, consumeFrom: address)` | `0x87eddb69736f41b812366535a59efc79b1997f2d237240d7176d210397012e1b` | ## FeesPlug -| Event | Arguments | Topic | -| ---------------------------- | -------------------------------------------------------- | -------------------------------------------------------------------- | -| `ConnectorPlugDisconnected` | `()` | `0xc2af098c82dba3c4b00be8bda596d62d13b98a87b42626fefa67e0bb0e198fdd` | -| `FeesDeposited` | `(appGateway: address, token: address, amount: uint256)` | `0x0fd38537e815732117cfdab41ba9b6d3eb2c5799d44039c100c05fc9c112f235` | -| `FeesWithdrawn` | `(token: address, amount: uint256, receiver: address)` | `0x87044da2612407bc001bb0985725dcc651a0dc71eaabfd1d7e8617ca85a8c19c` | -| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | -| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | -| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | -| `RoleGranted` | `(role: bytes32, grantee: address)` | `0x2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f3` | -| `RoleRevoked` | `(role: bytes32, revokee: address)` | `0x155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a52` | -| `TokenRemovedFromWhitelist` | `(token: address)` | `0xdd2e6d9f52cbe8f695939d018b7d4a216dc613a669876163ac548b916489d917` | -| `TokenWhitelisted` | `(token: address)` | `0x6a65f90b1a644d2faac467a21e07e50e3f8fa5846e26231d30ae79a417d3d262` | +| Event | Arguments | Topic | +| ---------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `ConnectorPlugDisconnected` | `()` | `0xc2af098c82dba3c4b00be8bda596d62d13b98a87b42626fefa67e0bb0e198fdd` | +| `FeesDeposited` | `(token: address, receiver: address, feeAmount: uint256, nativeAmount: uint256)` | `0xeb4e1b24b7fe377de69f80f7380bda5ba4b43176c6a4d300a3be9009c49f4228` | +| `FeesWithdrawn` | `(token: address, receiver: address, amount: uint256)` | `0x5e110f8bc8a20b65dcc87f224bdf1cc039346e267118bae2739847f07321ffa8` | +| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | +| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | +| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | +| `RoleGranted` | `(role: bytes32, grantee: address)` | `0x2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f3` | +| `RoleRevoked` | `(role: bytes32, revokee: address)` | `0x155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a52` | +| `TokenRemovedFromWhitelist` | `(token: address)` | `0xdd2e6d9f52cbe8f695939d018b7d4a216dc613a669876163ac548b916489d917` | +| `TokenWhitelisted` | `(token: address)` | `0x6a65f90b1a644d2faac467a21e07e50e3f8fa5846e26231d30ae79a417d3d262` | ## Socket -| Event | Arguments | Topic | -| ---------------------------- | ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `AppGatewayCallRequested` | `(callId: bytes32, chainSlug: uint32, plug: address, appGateway: address, params: bytes32, payload: bytes)` | `0x392cb36fae7bd0470268c65b15c32a745b37168c4ccd13348c59bd9170f3b3e8` | -| `ExecutionFailed` | `(payloadId: bytes32, returnData: bytes)` | `0xd255d8a333980d77af4f9179384057def133983cb02db3e1fdb70c4dc14102e8` | -| `ExecutionSuccess` | `(payloadId: bytes32, returnData: bytes)` | `0xc54787fbe087097b182e713f16d3443ad2e67cbe6732628451dd3695a11814c2` | -| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | -| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | -| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | -| `PlugConnected` | `(plug: address, appGateway: address, switchboard: address)` | `0x99c37c6da3bd69c6d59967915f8339f11a0a17fed28c615efb19457fdec0d7db` | -| `RoleGranted` | `(role: bytes32, grantee: address)` | `0x2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f3` | -| `RoleRevoked` | `(role: bytes32, revokee: address)` | `0x155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a52` | -| `SwitchboardAdded` | `(switchboard: address)` | `0x1595852923edfbbf906f09fc8523e4cfb022a194773c4d1509446b614146ee88` | -| `SwitchboardDisabled` | `(switchboard: address)` | `0x1b4ee41596b4e754e5665f01ed6122b356f7b36ea0a02030804fac7fa0fdddfc` | +| Event | Arguments | Topic | +| ---------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `AppGatewayCallRequested` | `(triggerId: bytes32, appGatewayId: bytes32, switchboard: address, plug: address, overrides: bytes, payload: bytes)` | `0x5c88d65ab8ba22a57e582bd8ddfa9801cc0ca6be6cb3182baaedc705a612419e` | +| `ExecutionFailed` | `(payloadId: bytes32, exceededMaxCopy: bool, returnData: bytes)` | `0x385334bc68a32c4d164625189adc7633e6074eb1b837fb4d11d768245151e4ce` | +| `ExecutionSuccess` | `(payloadId: bytes32, exceededMaxCopy: bool, returnData: bytes)` | `0x324d63a433b21a12b90e79cd2ba736b2a5238be6165e03b750fa4a7d5193d5d9` | +| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | +| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | +| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | +| `PlugConnected` | `(plug: address, appGatewayId: bytes32, switchboard: address)` | `0x90c5924e27cfb6e3a688e729083681f30494ae2615ae14aac3bc807a0c436a88` | +| `RoleGranted` | `(role: bytes32, grantee: address)` | `0x2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f3` | +| `RoleRevoked` | `(role: bytes32, revokee: address)` | `0x155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a52` | +| `SocketFeeManagerUpdated` | `(oldSocketFeeManager: address, newSocketFeeManager: address)` | `0xdcb02e10d5220346a4638aa2826eaab1897306623bc40a427049e4ebd12255b4` | +| `SwitchboardAdded` | `(switchboard: address)` | `0x1595852923edfbbf906f09fc8523e4cfb022a194773c4d1509446b614146ee88` | +| `SwitchboardDisabled` | `(switchboard: address)` | `0x1b4ee41596b4e754e5665f01ed6122b356f7b36ea0a02030804fac7fa0fdddfc` | +| `SwitchboardEnabled` | `(switchboard: address)` | `0x6909a9974e3eec619bc479ba882d30a5ef1219b72ab1ce6a354516e91be317b8` | ## SocketBatcher @@ -114,76 +133,92 @@ | `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | | `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | -## WatcherPrecompile +## SocketFeeManager -| Event | Arguments | Topic | -| ---------------------------- | ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `CalledAppGateway` | `(callId: bytes32, chainSlug: uint32, plug: address, appGateway: address, params: bytes32, payload: bytes)` | `0x255bcf22d238fe60f6611670cd7919d2bc890283be2fdaf6d2ad3411e777e33c` | -| `FinalizeRequested` | `(digest: bytes32, params: tuple)` | `0x5bc623895e2e50e307b4c3ba21df61ddfe68de0e084bb85eb1d42d4596532589` | -| `Finalized` | `(payloadId: bytes32, proof: bytes)` | `0x7e6e3e411317567fb9eabe3eb86768c3e33c46e38a50790726e916939b4918d6` | -| `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | -| `MarkedRevert` | `(payloadId: bytes32, isRevertingOnchain: bool)` | `0xcf1fd844cb4d32cbebb5ca6ce4ac834fe98da3ddac44deb77fffd22ad933824c` | -| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | -| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | -| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | -| `PromiseNotResolved` | `(payloadId: bytes32, asyncPromise: address)` | `0xbcf0d0c678940566e9e64f0c871439395bd5fb5c39bca3547b126fe6ee467937` | -| `PromiseResolved` | `(payloadId: bytes32, asyncPromise: address)` | `0x1b1b5810494fb3e17f7c46547e6e67cd6ad3e6001ea6fb7d12ea0241ba13c4ba` | -| `QueryRequested` | `(params: tuple)` | `0xca81bf0029a549d7e6e3a9c668a717472f4330a6a5ec4350304a9e79bf437345` | -| `RequestSubmitted` | `(middleware: address, requestCount: uint40, payloadParamsArray: tuple[])` | `0xb856562fcff2119ba754f0486f47c06087ebc1842bff464faf1b2a1f8d273b1d` | -| `RoleGranted` | `(role: bytes32, grantee: address)` | `0x2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f3` | -| `RoleRevoked` | `(role: bytes32, revokee: address)` | `0x155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a52` | -| `TimeoutRequested` | `(timeoutId: bytes32, target: address, payload: bytes, executeAt: uint256)` | `0xdf94fed77e41734b8a17815476bbbf88e2db15d762f42a30ddb9d7870f2fb858` | -| `TimeoutResolved` | `(timeoutId: bytes32, target: address, payload: bytes, executedAt: uint256)` | `0x221462ec065e22637f794ec3a7edb17b2f04bec88f0546dda308bc37a83801b8` | +| Event | Arguments | Topic | +| ---------------------------- | ---------------------------------------- | -------------------------------------------------------------------- | +| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | +| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | +| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | +| `RoleGranted` | `(role: bytes32, grantee: address)` | `0x2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f3` | +| `RoleRevoked` | `(role: bytes32, revokee: address)` | `0x155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a52` | +| `SocketFeesUpdated` | `(oldFees: uint256, newFees: uint256)` | `0xcbd4d756fb6198bbcc2e4013cce929f504ad46e9d97c543ef9a8dfea3e407053` | ## WatcherPrecompileConfig | Event | Arguments | Topic | | ---------------------------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | | `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | +| `IsValidPlugSet` | `(appGateway: address, chainSlug: uint32, plug: address, isValid: bool)` | `0x61cccc7387868fc741379c7acd9dd346e0ca2e5c067dc5b156fbbc55b1c2fcf5` | | `OnChainContractSet` | `(chainSlug: uint32, socket: address, contractFactoryPlug: address, feesPlug: address)` | `0xd24cf816377e3c571e7bc798dd43d3d5fc78c32f7fc94b42898b0d37c5301a4e` | | `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | | `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | | `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | -| `PlugAdded` | `(appGateway: address, chainSlug: uint32, plug: address)` | `0x2cb8d865028f9abf3dc064724043264907615fadc8615a3699a85edb66472273` | -| `RoleGranted` | `(role: bytes32, grantee: address)` | `0x2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f3` | -| `RoleRevoked` | `(role: bytes32, revokee: address)` | `0x155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a52` | +| `PlugAdded` | `(appGatewayId: bytes32, chainSlug: uint32, plug: address)` | `0x7b3e14230a721c4737d275f9a63b92c44cb657bcfddbe6fe9b4d9cd9bd8d4a95` | | `SwitchboardSet` | `(chainSlug: uint32, sbType: bytes32, switchboard: address)` | `0x6273f161f4a795e66ef3585d9b4442ef3796b32337157fdfb420b5281e4cf2e3` | ## WatcherPrecompileLimits -| Event | Arguments | Topic | -| ---------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------------------- | -| `AppGatewayActivated` | `(appGateway: address, maxLimit: uint256, ratePerSecond: uint256)` | `0x44628d7d5628b9fbc2c84ea9bf3bd3987fa9cde8d2b28e2d5ceb451f916cb8b9` | -| `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | -| `LimitParamsUpdated` | `(updates: tuple[])` | `0x81576b12f4d507fd0543afd25a86785573a595334c2c7eb8ca8ec1b0a56a55b3` | -| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | -| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | -| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | -| `RoleGranted` | `(role: bytes32, grantee: address)` | `0x2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f3` | -| `RoleRevoked` | `(role: bytes32, revokee: address)` | `0x155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a52` | +| Event | Arguments | Topic | +| --------------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------------------- | +| `AppGatewayActivated` | `(appGateway: address, maxLimit: uint256, ratePerSecond: uint256)` | `0x44628d7d5628b9fbc2c84ea9bf3bd3987fa9cde8d2b28e2d5ceb451f916cb8b9` | +| `CallBackFeesSet` | `(callBackFees: uint256)` | `0x667c97afffb32265f3b4e026d31b81dc223275ff8bb9819e67012197f5799faf` | +| `DefaultLimitAndRatePerSecondSet` | `(defaultLimit: uint256, defaultRatePerSecond: uint256)` | `0x39def16be1ce80876ad0b0936cfdf88b8be7a1790b6c1da16ba8bdee53367e8e` | +| `FinalizeFeesSet` | `(finalizeFees: uint256)` | `0x0b710f92aabbdda2e8c347f802353f34ef27845d79db79efb4884e8790a0d5fb` | +| `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | +| `LimitParamsUpdated` | `(updates: tuple[])` | `0x81576b12f4d507fd0543afd25a86785573a595334c2c7eb8ca8ec1b0a56a55b3` | +| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | +| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | +| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | +| `QueryFeesSet` | `(queryFees: uint256)` | `0x19569faa0df733d4b0806372423e828b05a5257eb7652da812b90f662bed5cfb` | +| `TimeoutFeesSet` | `(timeoutFees: uint256)` | `0xe8a5b23529bc11019d6df86a1ee0d043571d464902a3fa98e7e3e67dbd5981ca` | ## DeliveryHelper -| Event | Arguments | Topic | -| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `AuctionEnded` | `(requestCount: uint40, winningBid: tuple)` | `0x9cc96c8b9e588c26f8beae57fe7fbb59113b82865578b54ff3f025317dcd6895` | -| `BidTimeoutUpdated` | `(newBidTimeout: uint256)` | `0xd4552e666d0e4e343fb2b13682972a8f0c7f1a86e252d6433b356f0c0e817c3d` | -| `CallBackReverted` | `(requestCount_: uint40, payloadId_: bytes32)` | `0xcecb2641ea89470f68bf9f852d731e123505424e4dcfd770c7ea9e2e25326b1b` | -| `FeesIncreased` | `(appGateway: address, requestCount: uint40, newMaxFees: uint256)` | `0x63ee9e9e84d216b804cb18f51b7f7511254b0c1f11304b7a3aa34d57511aa6dc` | -| `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | -| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | -| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | -| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | -| `PayloadSubmitted` | `(requestCount: uint40, appGateway: address, payloadSubmitParams: tuple[], fees: tuple, auctionManager: address, onlyReadRequests: bool)` | `0x204c4de167e7a12fc9ad8231fa3d877639ed95a66bd19e1a55d1f68088d4c784` | -| `RequestCancelled` | `(requestCount: uint40)` | `0xff191657769be72fc08def44c645014c60d18cb24b9ca05c9a33406a28253245` | +| Event | Arguments | Topic | +| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `BidTimeoutUpdated` | `(newBidTimeout: uint256)` | `0xd4552e666d0e4e343fb2b13682972a8f0c7f1a86e252d6433b356f0c0e817c3d` | +| `ChainMaxMsgValueLimitsUpdated` | `(chainSlugs: uint32[], maxMsgValueLimits: uint256[])` | `0x17e47f6f0fa0e79831bee11b7c29adc45d9a7bd25acd70b91e4b2bad0f544352` | +| `FeesIncreased` | `(appGateway: address, requestCount: uint40, newMaxFees: uint256)` | `0x63ee9e9e84d216b804cb18f51b7f7511254b0c1f11304b7a3aa34d57511aa6dc` | +| `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | +| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | +| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | +| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | +| `PayloadSubmitted` | `(requestCount: uint40, appGateway: address, payloadSubmitParams: tuple[], fees: uint256, auctionManager: address, onlyReadRequests: bool)` | `0xc6455dba7c07a5e75c7189040ae9e3478162f333a96365b283b434fd0e32c6b3` | +| `RequestCancelled` | `(requestCount: uint40)` | `0xff191657769be72fc08def44c645014c60d18cb24b9ca05c9a33406a28253245` | ## FastSwitchboard -| Event | Arguments | Topic | -| ---------------------------- | ---------------------------------------- | -------------------------------------------------------------------- | -| `Attested` | `(digest_: bytes32, watcher: address)` | `0x3d83c7bc55c269e0bc853ddc0d7b9fca30216ecc43779acb4e36b7e0ad1c71e4` | -| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | -| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | -| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | -| `RoleGranted` | `(role: bytes32, grantee: address)` | `0x2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f3` | -| `RoleRevoked` | `(role: bytes32, revokee: address)` | `0x155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a52` | +| Event | Arguments | Topic | +| ---------------------------- | ----------------------------------------- | -------------------------------------------------------------------- | +| `Attested` | `(payloadId_: bytes32, watcher: address)` | `0x3d83c7bc55c269e0bc853ddc0d7b9fca30216ecc43779acb4e36b7e0ad1c71e4` | +| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | +| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | +| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | +| `RoleGranted` | `(role: bytes32, grantee: address)` | `0x2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f3` | +| `RoleRevoked` | `(role: bytes32, revokee: address)` | `0x155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a52` | + +## WatcherPrecompile + +| Event | Arguments | Topic | +| ----------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `AppGatewayCallFailed` | `(triggerId: bytes32)` | `0xcaf8475fdade8465ea31672463949e6cf1797fdcdd11eeddbbaf857e1e5907b7` | +| `CalledAppGateway` | `(triggerId: bytes32)` | `0xf659ffb3875368f54fb4ab8f5412ac4518af79701a48076f7a58d4448e4bdd0b` | +| `ExpiryTimeSet` | `(expiryTime: uint256)` | `0x07e837e13ad9a34715a6bd45f49bbf12de19f06df79cb0be12b3a7d7f2397fa9` | +| `FinalizeRequested` | `(digest: bytes32, params: tuple)` | `0x5bc623895e2e50e307b4c3ba21df61ddfe68de0e084bb85eb1d42d4596532589` | +| `Finalized` | `(payloadId: bytes32, proof: bytes)` | `0x7e6e3e411317567fb9eabe3eb86768c3e33c46e38a50790726e916939b4918d6` | +| `Initialized` | `(version: uint64)` | `0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2` | +| `MarkedRevert` | `(payloadId: bytes32, isRevertingOnchain: bool)` | `0xcf1fd844cb4d32cbebb5ca6ce4ac834fe98da3ddac44deb77fffd22ad933824c` | +| `MaxTimeoutDelayInSecondsSet` | `(maxTimeoutDelayInSeconds: uint256)` | `0x3564638b089495c19e7359a040be083841e11da34c22a29ea8d602c8a9805fec` | +| `OwnershipHandoverCanceled` | `(pendingOwner: address)` | `0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92` | +| `OwnershipHandoverRequested` | `(pendingOwner: address)` | `0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d` | +| `OwnershipTransferred` | `(oldOwner: address, newOwner: address)` | `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` | +| `PromiseNotResolved` | `(payloadId: bytes32, asyncPromise: address)` | `0xbcf0d0c678940566e9e64f0c871439395bd5fb5c39bca3547b126fe6ee467937` | +| `PromiseResolved` | `(payloadId: bytes32, asyncPromise: address)` | `0x1b1b5810494fb3e17f7c46547e6e67cd6ad3e6001ea6fb7d12ea0241ba13c4ba` | +| `QueryRequested` | `(params: tuple)` | `0xca81bf0029a549d7e6e3a9c668a717472f4330a6a5ec4350304a9e79bf437345` | +| `RequestCancelledFromGateway` | `(requestCount: uint40)` | `0x333619ca4a2a9c4ee292aafa3c37215d88afe358afee4a575cfed21d743091c6` | +| `RequestSubmitted` | `(middleware: address, requestCount: uint40, payloadParamsArray: tuple[])` | `0xb856562fcff2119ba754f0486f47c06087ebc1842bff464faf1b2a1f8d273b1d` | +| `TimeoutRequested` | `(timeoutId: bytes32, target: address, payload: bytes, executeAt: uint256)` | `0xdf94fed77e41734b8a17815476bbbf88e2db15d762f42a30ddb9d7870f2fb858` | +| `TimeoutResolved` | `(timeoutId: bytes32, target: address, payload: bytes, executedAt: uint256, returnData: bytes)` | `0x61122416680ac7038ca053afc2c26983f2c524e5003b1f4d9dea095fbc8f6905` | +| `WatcherPrecompileConfigSet` | `(watcherPrecompileConfig: address)` | `0xdc19bca647582b3fbf69a6ffacabf56b4f7a4551d2d0944843712f2d0987a8e5` | +| `WatcherPrecompileLimitsSet` | `(watcherPrecompileLimits: address)` | `0xcec7ba89301793a37efb418279f17f8dd77e5959e9f3fbcbc54e40615a14bd8e` | diff --git a/FunctionSignatures.md b/FunctionSignatures.md index 557f95f5..17183218 100644 --- a/FunctionSignatures.md +++ b/FunctionSignatures.md @@ -15,6 +15,25 @@ | `upgrade` | `0x99a88ec4` | | `upgradeAndCall` | `0x9623609d` | +## TestUSDC + +| Function | Signature | +| ------------------ | ------------ | +| `DOMAIN_SEPARATOR` | `0x3644e515` | +| `allowance` | `0xdd62ed3e` | +| `approve` | `0x095ea7b3` | +| `balanceOf` | `0x70a08231` | +| `decimals` | `0x313ce567` | +| `mint` | `0x40c10f19` | +| `name` | `0x06fdde03` | +| `nonces` | `0x7ecebe00` | +| `owner` | `0x8da5cb5b` | +| `permit` | `0xd505accf` | +| `symbol` | `0x95d89b41` | +| `totalSupply` | `0x18160ddd` | +| `transfer` | `0xa9059cbb` | +| `transferFrom` | `0x23b872dd` | + ## AddressResolver | Function | Signature | @@ -83,6 +102,8 @@ | `getOnChainAddress` | `0x9da48789` | | `initialize` | `0x647c576c` | | `latestAsyncPromise` | `0xb8a8ba52` | +| `latestPromiseCaller` | `0xdfe580a8` | +| `latestRequestCount` | `0x198b9a47` | | `onChainAddress` | `0x8bd0b363` | | `then` | `0x0bf2ba15` | | `watcherPrecompileConfig` | `0x8618a912` | @@ -91,51 +112,52 @@ ## AuctionManager -| Function | Signature | -| ---------------------------- | ------------ | -| `addressResolver__` | `0x6a750469` | -| `auctionClosed` | `0x6862ebb0` | -| `auctionEndDelaySeconds` | `0x9087dfdb` | -| `auctionStarted` | `0x7c9c5bb8` | -| `bid` | `0xfcdf49c2` | -| `cancelOwnershipHandover` | `0x54d1f13d` | -| `completeOwnershipHandover` | `0xf04e283e` | -| `deliveryHelper__` | `0xc031dfb4` | -| `endAuction` | `0x1212e653` | -| `evmxSlug` | `0x8bae77c2` | -| `expireBid` | `0x1dd5022c` | -| `grantRole` | `0x2f2ff15d` | -| `hasRole` | `0x91d14854` | -| `initialize` | `0x5f24043b` | -| `maxReAuctionCount` | `0xc367b376` | -| `owner` | `0x8da5cb5b` | -| `ownershipHandoverExpiresAt` | `0xfee81cf4` | -| `reAuctionCount` | `0x9b4b22d3` | -| `renounceOwnership` | `0x715018a6` | -| `requestOwnershipHandover` | `0x25692962` | -| `revokeRole` | `0xd547741f` | -| `setAuctionEndDelaySeconds` | `0x88606b1a` | -| `transferOwnership` | `0xf2fde38b` | -| `watcherPrecompileConfig` | `0x8618a912` | -| `watcherPrecompileLimits` | `0xa71cd97d` | -| `watcherPrecompile__` | `0x1de360c3` | -| `whitelistedTransmitters` | `0xc2f1bf5d` | -| `winningBids` | `0x9133f232` | +| Function | Signature | +| -------------------------------- | ------------ | +| `addressResolver__` | `0x6a750469` | +| `auctionClosed` | `0x6862ebb0` | +| `auctionEndDelaySeconds` | `0x9087dfdb` | +| `auctionStarted` | `0x7c9c5bb8` | +| `bid` | `0xfcdf49c2` | +| `cancelOwnershipHandover` | `0x54d1f13d` | +| `completeOwnershipHandover` | `0xf04e283e` | +| `deliveryHelper__` | `0xc031dfb4` | +| `endAuction` | `0x1212e653` | +| `evmxSlug` | `0x8bae77c2` | +| `expireBid` | `0x1dd5022c` | +| `getTransmitterMaxFeesAvailable` | `0xa70f18ea` | +| `grantRole` | `0x2f2ff15d` | +| `hasRole` | `0x91d14854` | +| `initialize` | `0x5f24043b` | +| `maxReAuctionCount` | `0xc367b376` | +| `owner` | `0x8da5cb5b` | +| `ownershipHandoverExpiresAt` | `0xfee81cf4` | +| `reAuctionCount` | `0x9b4b22d3` | +| `renounceOwnership` | `0x715018a6` | +| `requestOwnershipHandover` | `0x25692962` | +| `revokeRole` | `0xd547741f` | +| `setAuctionEndDelaySeconds` | `0x88606b1a` | +| `transferOwnership` | `0xf2fde38b` | +| `watcherPrecompileConfig` | `0x8618a912` | +| `watcherPrecompileLimits` | `0xa71cd97d` | +| `watcherPrecompile__` | `0x1de360c3` | +| `winningBids` | `0x9133f232` | ## ContractFactoryPlug | Function | Signature | | ---------------------------- | ------------ | -| `appGateway` | `0xb82bb881` | +| `appGatewayId` | `0x1c335f49` | | `cancelOwnershipHandover` | `0x54d1f13d` | | `completeOwnershipHandover` | `0xf04e283e` | -| `connectSocket` | `0x052615a6` | -| `deployContract` | `0x35041492` | +| `connectSocket` | `0x258d19c8` | +| `deployContract` | `0xa0695389` | | `getAddress` | `0x94ca2cb5` | | `grantRole` | `0x2f2ff15d` | | `hasRole` | `0x91d14854` | -| `initSocket` | `0x59c92b64` | +| `initSocket` | `0xa07d8545` | | `isSocketInitialized` | `0x9a7d9a9b` | +| `overrides` | `0x4a85f041` | | `owner` | `0x8da5cb5b` | | `ownershipHandoverExpiresAt` | `0xfee81cf4` | | `renounceOwnership` | `0x715018a6` | @@ -147,53 +169,64 @@ ## FeesManager -| Function | Signature | -| ---------------------------- | ------------ | -| `addressResolver__` | `0x6a750469` | -| `appGatewayFeeBalances` | `0x46a312be` | -| `blockFees` | `0x1c0ac675` | -| `cancelOwnershipHandover` | `0x54d1f13d` | -| `completeOwnershipHandover` | `0xf04e283e` | -| `deliveryHelper__` | `0xc031dfb4` | -| `evmxSlug` | `0x8bae77c2` | -| `feesCounter` | `0xb94f4778` | -| `getAvailableFees` | `0xe3d07506` | -| `incrementFeesDeposited` | `0x4f88fe32` | -| `initialize` | `0x6f6186bd` | -| `isFeesEnough` | `0x7d274c6a` | -| `isNonceUsed` | `0x5d00bb12` | -| `owner` | `0x8da5cb5b` | -| `ownershipHandoverExpiresAt` | `0xfee81cf4` | -| `renounceOwnership` | `0x715018a6` | -| `requestCountBlockedFees` | `0xd09604ed` | -| `requestOwnershipHandover` | `0x25692962` | -| `sbType` | `0x745de344` | -| `transferOwnership` | `0xf2fde38b` | -| `transmitterCredits` | `0xefb4cdea` | -| `unblockAndAssignFees` | `0x3c5366a2` | -| `unblockFees` | `0xc1867a4b` | -| `watcherPrecompileConfig` | `0x8618a912` | -| `watcherPrecompileLimits` | `0xa71cd97d` | -| `watcherPrecompile__` | `0x1de360c3` | -| `withdrawFees` | `0xe1a69364` | -| `withdrawTransmitterFees` | `0x8c047bbd` | +| Function | Signature | +| ------------------------------------------------ | ------------ | +| `addressResolver__` | `0x6a750469` | +| `assignWatcherPrecompileCreditsFromAddress` | `0xd699b6c8` | +| `assignWatcherPrecompileCreditsFromRequestCount` | `0x7a483022` | +| `blockCredits` | `0x2d64fc91` | +| `cancelOwnershipHandover` | `0x54d1f13d` | +| `completeOwnershipHandover` | `0xf04e283e` | +| `deliveryHelper__` | `0xc031dfb4` | +| `depositCredits` | `0x211998c8` | +| `evmxSlug` | `0x8bae77c2` | +| `feesCounter` | `0xb94f4778` | +| `getAvailableCredits` | `0xb065a8e5` | +| `getMaxCreditsAvailableForWithdraw` | `0x6ef9efe2` | +| `getWithdrawTransmitterCreditsPayloadParams` | `0x27be4536` | +| `initialize` | `0x6f6186bd` | +| `isAppGatewayWhitelisted` | `0x2a83b813` | +| `isNonceUsed` | `0x5d00bb12` | +| `isUserCreditsEnough` | `0x5bee3a67` | +| `onRequestComplete` | `0x5ed1f959` | +| `owner` | `0x8da5cb5b` | +| `ownershipHandoverExpiresAt` | `0xfee81cf4` | +| `renounceOwnership` | `0x715018a6` | +| `requestCountCredits` | `0x0c9b8a49` | +| `requestOwnershipHandover` | `0x25692962` | +| `sbType` | `0x745de344` | +| `tokenPoolBalances` | `0x2eda3bfd` | +| `transferOwnership` | `0xf2fde38b` | +| `unblockAndAssignCredits` | `0x01958181` | +| `unblockCredits` | `0xa0b32314` | +| `unwrap` | `0xde0e9a3e` | +| `userCredits` | `0x20babb92` | +| `userNonce` | `0x2e04b8e7` | +| `watcherPrecompileConfig` | `0x8618a912` | +| `watcherPrecompileCredits` | `0x052e1f6a` | +| `watcherPrecompileLimits` | `0xa71cd97d` | +| `watcherPrecompile__` | `0x1de360c3` | +| `whitelistAppGatewayWithSignature` | `0x28cbf83d` | +| `whitelistAppGateways` | `0x6c2499e3` | +| `withdrawCredits` | `0xc22f8cf3` | +| `wrap` | `0xd46eb119` | ## FeesPlug | Function | Signature | | ---------------------------- | ------------ | -| `appGateway` | `0xb82bb881` | -| `balanceOf` | `0x70a08231` | +| `appGatewayId` | `0x1c335f49` | | `cancelOwnershipHandover` | `0x54d1f13d` | | `completeOwnershipHandover` | `0xf04e283e` | -| `connectSocket` | `0x052615a6` | -| `deposit` | `0x8340f549` | -| `distributeFee` | `0x7aeee972` | -| `feesRedeemed` | `0x58f8782b` | +| `connectSocket` | `0x258d19c8` | +| `depositToFee` | `0xef0db49f` | +| `depositToFeeAndNative` | `0x5f952be8` | +| `depositToNative` | `0xe2665889` | | `grantRole` | `0x2f2ff15d` | | `hasRole` | `0x91d14854` | -| `initSocket` | `0x59c92b64` | +| `initSocket` | `0xa07d8545` | | `isSocketInitialized` | `0x9a7d9a9b` | +| `overrides` | `0x4a85f041` | | `owner` | `0x8da5cb5b` | | `ownershipHandoverExpiresAt` | `0xfee81cf4` | | `removeTokenFromWhitelist` | `0x306275be` | @@ -205,40 +238,45 @@ | `transferOwnership` | `0xf2fde38b` | | `whitelistToken` | `0x6247f6f2` | | `whitelistedTokens` | `0xdaf9c210` | -| `withdrawFees` | `0x9ba372c2` | +| `withdrawFees` | `0xe55dc4e6` | ## Socket | Function | Signature | | ---------------------------- | ------------ | -| `callAppGateway` | `0x31ed7099` | -| `callCounter` | `0xc0f9882e` | | `cancelOwnershipHandover` | `0x54d1f13d` | | `chainSlug` | `0xb349ba65` | | `completeOwnershipHandover` | `0xf04e283e` | -| `connect` | `0x295058ef` | +| `connect` | `0xb3bde1aa` | | `disableSwitchboard` | `0xe545b261` | -| `execute` | `0x2c6571a9` | +| `enableSwitchboard` | `0xf97a498a` | +| `execute` | `0x68ef086b` | | `getPlugConfig` | `0xf9778ee0` | | `grantRole` | `0x2f2ff15d` | | `hasRole` | `0x91d14854` | | `isValidSwitchboard` | `0xb2d67675` | +| `maxCopyBytes` | `0x212249d4` | | `owner` | `0x8da5cb5b` | | `ownershipHandoverExpiresAt` | `0xfee81cf4` | | `payloadExecuted` | `0x3eaeac3d` | +| `payloadIdToDigest` | `0x7c8552b2` | | `registerSwitchboard` | `0x74f5b1fc` | | `renounceOwnership` | `0x715018a6` | | `requestOwnershipHandover` | `0x25692962` | | `rescueFunds` | `0x6ccae054` | | `revokeRole` | `0xd547741f` | +| `setMaxCopyBytes` | `0x4fc7d6e9` | +| `setSocketFeeManager` | `0x25bd97e5` | +| `socketFeeManager` | `0xde5b8838` | | `transferOwnership` | `0xf2fde38b` | +| `triggerCounter` | `0x8b0021de` | | `version` | `0x54fd4d50` | ## SocketBatcher | Function | Signature | | ---------------------------- | ------------ | -| `attestAndExecute` | `0x841f0228` | +| `attestAndExecute` | `0xa11d3bdc` | | `cancelOwnershipHandover` | `0x54d1f13d` | | `completeOwnershipHandover` | `0xf04e283e` | | `owner` | `0x8da5cb5b` | @@ -249,64 +287,25 @@ | `socket__` | `0xc6a261d2` | | `transferOwnership` | `0xf2fde38b` | -## WatcherPrecompile +## SocketFeeManager -| Function | Signature | -| ----------------------------- | ------------ | -| `addressResolver__` | `0x6a750469` | -| `appGatewayCalled` | `0xc6767cf1` | -| `batchPayloadIds` | `0x02b74f98` | -| `callAppGateways` | `0xdede3465` | -| `cancelOwnershipHandover` | `0x54d1f13d` | -| `cancelRequest` | `0x50ad0779` | -| `completeOwnershipHandover` | `0xf04e283e` | -| `deliveryHelper__` | `0xc031dfb4` | -| `evmxSlug` | `0x8bae77c2` | -| `expiryTime` | `0x99bc0aea` | -| `finalize` | `0x7ffecf2e` | -| `finalized` | `0x81c051de` | -| `getBatchPayloadIds` | `0xfd83cd1f` | -| `getBatches` | `0xcb95b7b3` | -| `getCurrentRequestCount` | `0x5715abbb` | -| `getDigest` | `0xeba9500e` | -| `getPayloadParams` | `0xae5eeb77` | -| `getRequestParams` | `0x71263d0d` | -| `grantRole` | `0x2f2ff15d` | -| `hasRole` | `0x91d14854` | -| `initialize` | `0xb7dc6b77` | -| `isNonceUsed` | `0x5d00bb12` | -| `isPromiseExecuted` | `0x17a2cdf0` | -| `markRevert` | `0x1c75dad5` | -| `maxTimeoutDelayInSeconds` | `0x46fbc9d7` | -| `nextBatchCount` | `0x333a3963` | -| `nextRequestCount` | `0xfef72893` | -| `owner` | `0x8da5cb5b` | -| `ownershipHandoverExpiresAt` | `0xfee81cf4` | -| `payloadCounter` | `0x550ce1d5` | -| `payloads` | `0x58722672` | -| `query` | `0x16ad71bc` | -| `renounceOwnership` | `0x715018a6` | -| `requestBatchIds` | `0xf865c4a7` | -| `requestOwnershipHandover` | `0x25692962` | -| `requestParams` | `0x5ce2d853` | -| `resolvePromises` | `0xccb1caff` | -| `resolveTimeout` | `0xa67c0781` | -| `revokeRole` | `0xd547741f` | -| `setExpiryTime` | `0x30fc4cff` | -| `setMaxTimeoutDelayInSeconds` | `0x65d480fc` | -| `setTimeout` | `0x9c29ec74` | -| `startProcessingRequest` | `0x77290f24` | -| `submitRequest` | `0x16b47482` | -| `timeoutCounter` | `0x94f6522e` | -| `timeoutRequests` | `0xcdf85751` | -| `transferOwnership` | `0xf2fde38b` | -| `updateTransmitter` | `0xb228a22c` | -| `watcherPrecompileConfig` | `0x8618a912` | -| `watcherPrecompileConfig__` | `0xa816cbd9` | -| `watcherPrecompileLimits` | `0xa71cd97d` | -| `watcherPrecompileLimits__` | `0xb2ad6c48` | -| `watcherPrecompile__` | `0x1de360c3` | -| `watcherProofs` | `0x3fa3166b` | +| Function | Signature | +| ---------------------------- | ------------ | +| `cancelOwnershipHandover` | `0x54d1f13d` | +| `completeOwnershipHandover` | `0xf04e283e` | +| `getMinSocketFees` | `0xd383b688` | +| `grantRole` | `0x2f2ff15d` | +| `hasRole` | `0x91d14854` | +| `owner` | `0x8da5cb5b` | +| `ownershipHandoverExpiresAt` | `0xfee81cf4` | +| `payAndCheckFees` | `0xbaa56229` | +| `renounceOwnership` | `0x715018a6` | +| `requestOwnershipHandover` | `0x25692962` | +| `rescueFunds` | `0x6ccae054` | +| `revokeRole` | `0xd547741f` | +| `setSocketFees` | `0x47a406f6` | +| `socketFees` | `0xab1b33a8` | +| `transferOwnership` | `0xf2fde38b` | ## WatcherPrecompileConfig @@ -320,8 +319,6 @@ | `evmxSlug` | `0x8bae77c2` | | `feesPlug` | `0xd1ba159d` | | `getPlugConfigs` | `0x8a028c38` | -| `grantRole` | `0x2f2ff15d` | -| `hasRole` | `0x91d14854` | | `initialize` | `0x6ecf2b22` | | `isNonceUsed` | `0x5d00bb12` | | `isValidPlug` | `0xec8aef74` | @@ -329,62 +326,66 @@ | `ownershipHandoverExpiresAt` | `0xfee81cf4` | | `renounceOwnership` | `0x715018a6` | | `requestOwnershipHandover` | `0x25692962` | -| `revokeRole` | `0xd547741f` | -| `setAppGateways` | `0xbdf0b455` | +| `setAppGateways` | `0xdd8539d4` | | `setIsValidPlug` | `0xb3a6bbcf` | | `setOnChainContracts` | `0x33fa78c2` | | `setSwitchboard` | `0x61706f1e` | | `sockets` | `0xb44a23ab` | | `switchboards` | `0xaa539546` | | `transferOwnership` | `0xf2fde38b` | -| `verifyConnections` | `0xe283ce7b` | +| `verifyConnections` | `0xf269ab50` | | `watcherPrecompileConfig` | `0x8618a912` | | `watcherPrecompileLimits` | `0xa71cd97d` | | `watcherPrecompile__` | `0x1de360c3` | ## WatcherPrecompileLimits -| Function | Signature | -| ---------------------------- | ------------ | -| `LIMIT_DECIMALS` | `0x1e65497d` | -| `addressResolver__` | `0x6a750469` | -| `cancelOwnershipHandover` | `0x54d1f13d` | -| `completeOwnershipHandover` | `0xf04e283e` | -| `consumeLimit` | `0xc22f5a13` | -| `defaultLimit` | `0xe26b013b` | -| `defaultRatePerSecond` | `0x16d7acdf` | -| `deliveryHelper__` | `0xc031dfb4` | -| `getCurrentLimit` | `0x1a065507` | -| `getLimitParams` | `0x2ff81ee0` | -| `grantRole` | `0x2f2ff15d` | -| `hasRole` | `0x91d14854` | -| `initialize` | `0x1794bb3c` | -| `owner` | `0x8da5cb5b` | -| `ownershipHandoverExpiresAt` | `0xfee81cf4` | -| `renounceOwnership` | `0x715018a6` | -| `requestOwnershipHandover` | `0x25692962` | -| `revokeRole` | `0xd547741f` | -| `setDefaultLimit` | `0x995284b1` | -| `setDefaultRatePerSecond` | `0xa44df657` | -| `transferOwnership` | `0xf2fde38b` | -| `updateLimitParams` | `0x01b2a5a0` | -| `watcherPrecompileConfig` | `0x8618a912` | -| `watcherPrecompileLimits` | `0xa71cd97d` | -| `watcherPrecompile__` | `0x1de360c3` | +| Function | Signature | +| --------------------------------- | ------------ | +| `addressResolver__` | `0x6a750469` | +| `callBackFees` | `0xf9554ecc` | +| `cancelOwnershipHandover` | `0x54d1f13d` | +| `completeOwnershipHandover` | `0xf04e283e` | +| `consumeLimit` | `0xc22f5a13` | +| `defaultLimit` | `0xe26b013b` | +| `defaultRatePerSecond` | `0x16d7acdf` | +| `deliveryHelper__` | `0xc031dfb4` | +| `finalizeFees` | `0x09207879` | +| `getCurrentLimit` | `0x1a065507` | +| `getLimitParams` | `0x2ff81ee0` | +| `getTotalFeesRequired` | `0x964500b5` | +| `initialize` | `0x1794bb3c` | +| `limitDecimals` | `0xee185533` | +| `owner` | `0x8da5cb5b` | +| `ownershipHandoverExpiresAt` | `0xfee81cf4` | +| `queryFees` | `0xcfcbafb6` | +| `renounceOwnership` | `0x715018a6` | +| `requestOwnershipHandover` | `0x25692962` | +| `setCallBackFees` | `0x622be814` | +| `setDefaultLimitAndRatePerSecond` | `0x7e434156` | +| `setFinalizeFees` | `0xbce0a88c` | +| `setQueryFees` | `0x877135d7` | +| `setTimeoutFees` | `0x571db4f9` | +| `timeoutFees` | `0xeab12f7e` | +| `transferOwnership` | `0xf2fde38b` | +| `updateLimitParams` | `0x01b2a5a0` | +| `watcherPrecompileConfig` | `0x8618a912` | +| `watcherPrecompileLimits` | `0xa71cd97d` | +| `watcherPrecompile__` | `0x1de360c3` | ## DeliveryHelper | Function | Signature | | ------------------------------ | ------------ | | `addressResolver__` | `0x6a750469` | -| `batch` | `0x039cc50a` | +| `batch` | `0xd9307dd8` | | `bidTimeout` | `0x94090d0b` | | `cancelOwnershipHandover` | `0x54d1f13d` | | `cancelRequest` | `0x50ad0779` | +| `chainMaxMsgValueLimit` | `0x01d1e126` | | `clearQueue` | `0xf22cb874` | | `completeOwnershipHandover` | `0xf04e283e` | | `deliveryHelper__` | `0xc031dfb4` | -| `endTimeout` | `0x9c3bb867` | | `finishRequest` | `0xeab148c0` | | `getDeliveryHelperPlugAddress` | `0xb709bd9f` | | `getFees` | `0xfbf4ec4b` | @@ -400,19 +401,21 @@ | `requestOwnershipHandover` | `0x25692962` | | `requests` | `0xb71a5e58` | | `saltCounter` | `0xa04c6809` | -| `startRequestProcessing` | `0xf61474a9` | +| `startRequestProcessing` | `0x5ca2100f` | | `transferOwnership` | `0xf2fde38b` | | `updateBidTimeout` | `0xa29f83d1` | +| `updateChainMaxMsgValueLimits` | `0x0b32de76` | | `watcherPrecompileConfig` | `0x8618a912` | | `watcherPrecompileLimits` | `0xa71cd97d` | | `watcherPrecompile__` | `0x1de360c3` | -| `withdrawTo` | `0x74c33667` | +| `withdrawTo` | `0x2ba9d5bb` | +| `withdrawTransmitterFees` | `0x38ff6dd2` | ## FastSwitchboard | Function | Signature | | ---------------------------- | ------------ | -| `allowPacket` | `0x21e9ec80` | +| `allowPayload` | `0x31c23f66` | | `attest` | `0x63671b60` | | `cancelOwnershipHandover` | `0x54d1f13d` | | `chainSlug` | `0xb349ba65` | @@ -420,7 +423,6 @@ | `grantRole` | `0x2f2ff15d` | | `hasRole` | `0x91d14854` | | `isAttested` | `0xc13c2396` | -| `nextNonce` | `0x0cd55abf` | | `owner` | `0x8da5cb5b` | | `ownershipHandoverExpiresAt` | `0xfee81cf4` | | `registerSwitchboard` | `0x74f5b1fc` | @@ -430,3 +432,63 @@ | `revokeRole` | `0xd547741f` | | `socket__` | `0xc6a261d2` | | `transferOwnership` | `0xf2fde38b` | + +## WatcherPrecompile + +| Function | Signature | +| ----------------------------- | ------------ | +| `addressResolver__` | `0x6a750469` | +| `appGatewayCalled` | `0xc6767cf1` | +| `appGatewayCaller` | `0x712b193a` | +| `batchPayloadIds` | `0x02b74f98` | +| `callAppGateways` | `0xaef0b33d` | +| `cancelOwnershipHandover` | `0x54d1f13d` | +| `cancelRequest` | `0x50ad0779` | +| `completeOwnershipHandover` | `0xf04e283e` | +| `deliveryHelper__` | `0xc031dfb4` | +| `evmxSlug` | `0x8bae77c2` | +| `expiryTime` | `0x99bc0aea` | +| `finalize` | `0x7ffecf2e` | +| `finalized` | `0x81c051de` | +| `getBatchPayloadIds` | `0xfd83cd1f` | +| `getBatches` | `0xcb95b7b3` | +| `getCurrentRequestCount` | `0x5715abbb` | +| `getDigest` | `0xa7993154` | +| `getPayloadParams` | `0xae5eeb77` | +| `getRequestParams` | `0x71263d0d` | +| `initialize` | `0xb7dc6b77` | +| `isNonceUsed` | `0x5d00bb12` | +| `isPromiseExecuted` | `0x17a2cdf0` | +| `markRevert` | `0x1c75dad5` | +| `maxTimeoutDelayInSeconds` | `0x46fbc9d7` | +| `nextBatchCount` | `0x333a3963` | +| `nextRequestCount` | `0xfef72893` | +| `owner` | `0x8da5cb5b` | +| `ownershipHandoverExpiresAt` | `0xfee81cf4` | +| `payloadCounter` | `0x550ce1d5` | +| `payloads` | `0x58722672` | +| `query` | `0x16ad71bc` | +| `renounceOwnership` | `0x715018a6` | +| `requestBatchIds` | `0xf865c4a7` | +| `requestMetadata` | `0x875b3f7e` | +| `requestOwnershipHandover` | `0x25692962` | +| `requestParams` | `0x5ce2d853` | +| `resolvePromises` | `0xccb1caff` | +| `resolveTimeout` | `0xa67c0781` | +| `setExpiryTime` | `0x30fc4cff` | +| `setMaxTimeoutDelayInSeconds` | `0x65d480fc` | +| `setTimeout` | `0x9c29ec74` | +| `setWatcherPrecompileConfig` | `0x794edeb4` | +| `setWatcherPrecompileLimits` | `0x712a6f07` | +| `startProcessingRequest` | `0x77290f24` | +| `submitRequest` | `0x16b47482` | +| `timeoutIdPrefix` | `0x96ec119f` | +| `timeoutRequests` | `0xcdf85751` | +| `transferOwnership` | `0xf2fde38b` | +| `updateTransmitter` | `0xb228a22c` | +| `watcherPrecompileConfig` | `0x8618a912` | +| `watcherPrecompileConfig__` | `0xa816cbd9` | +| `watcherPrecompileLimits` | `0xa71cd97d` | +| `watcherPrecompileLimits__` | `0xb2ad6c48` | +| `watcherPrecompile__` | `0x1de360c3` | +| `watcherProofs` | `0x3fa3166b` | diff --git a/contracts/base/AppGatewayBase.sol b/contracts/base/AppGatewayBase.sol index 4b7e9950..f1a936f4 100644 --- a/contracts/base/AppGatewayBase.sol +++ b/contracts/base/AppGatewayBase.sol @@ -206,7 +206,8 @@ abstract contract AppGatewayBase is AddressResolverUtil, IAppGateway { return address(0); } - onChainAddress = IForwarder(forwarderAddresses[contractId_][chainSlug_]).getOnChainAddress(); + onChainAddress = IForwarder(forwarderAddresses[contractId_][chainSlug_]) + .getOnChainAddress(); } //////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/contracts/helpers/TestUSDC.sol b/contracts/helpers/TestUSDC.sol new file mode 100644 index 00000000..02528a07 --- /dev/null +++ b/contracts/helpers/TestUSDC.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.21; + +import "solady/tokens/ERC20.sol"; + +contract TestUSDC is ERC20 { + address public immutable owner; + string private _name; + string private _symbol; + uint8 private _decimals; + + constructor( + string memory name_, + string memory symbol_, + uint8 decimals_, + address owner_, + uint256 initialSupply_ + ) { + owner = owner_; + _name = name_; + _symbol = symbol_; + _decimals = decimals_; + _mint(owner_, initialSupply_); + } + + function name() public view override returns (string memory) { + return _name; + } + + function symbol() public view override returns (string memory) { + return _symbol; + } + + function decimals() public view override returns (uint8) { + return _decimals; + } + + function mint(address to, uint256 amount) external { + _mint(to, amount); + } +} diff --git a/contracts/protocol/socket/Socket.sol b/contracts/protocol/socket/Socket.sol index 78f20288..2b39f518 100644 --- a/contracts/protocol/socket/Socket.sol +++ b/contracts/protocol/socket/Socket.sol @@ -140,14 +140,12 @@ contract Socket is SocketUtils { // NOTE: external un-trusted call bool exceededMaxCopy; - (success, exceededMaxCopy, returnData) = executeParams_ - .target - .tryCall( - executeParams_.value, - executeParams_.gasLimit, - maxCopyBytes, - executeParams_.payload - ); + (success, exceededMaxCopy, returnData) = executeParams_.target.tryCall( + executeParams_.value, + executeParams_.gasLimit, + maxCopyBytes, + executeParams_.payload + ); if (success) { emit ExecutionSuccess(payloadId_, exceededMaxCopy, returnData); diff --git a/contracts/protocol/watcherPrecompile/WatcherPrecompileConfig.sol b/contracts/protocol/watcherPrecompile/WatcherPrecompileConfig.sol index 3d9b4f09..81083086 100644 --- a/contracts/protocol/watcherPrecompile/WatcherPrecompileConfig.sol +++ b/contracts/protocol/watcherPrecompile/WatcherPrecompileConfig.sol @@ -85,6 +85,13 @@ contract WatcherPrecompileConfig is address feesPlug ); + /// @notice Emitted when a valid plug is set for an app gateway + /// @param appGateway The address of the app gateway + /// @param chainSlug The identifier of the network + /// @param plug The address of the plug + /// @param isValid Whether the plug is valid + event IsValidPlugSet(address appGateway, uint32 chainSlug, address plug, bool isValid); + error InvalidGateway(); error InvalidSwitchboard(); @@ -162,6 +169,7 @@ contract WatcherPrecompileConfig is /// @param isValid_ Whether the plug is valid function setIsValidPlug(uint32 chainSlug_, address plug_, bool isValid_) external { isValidPlug[msg.sender][chainSlug_][plug_] = isValid_; + emit IsValidPlugSet(msg.sender, chainSlug_, plug_, isValid_); } /// @notice Retrieves the configuration for a specific plug on a network diff --git a/contracts/protocol/watcherPrecompile/WatcherPrecompileLimits.sol b/contracts/protocol/watcherPrecompile/WatcherPrecompileLimits.sol index 01a084da..2c01968e 100644 --- a/contracts/protocol/watcherPrecompile/WatcherPrecompileLimits.sol +++ b/contracts/protocol/watcherPrecompile/WatcherPrecompileLimits.sol @@ -51,6 +51,14 @@ contract WatcherPrecompileLimits is /// @notice Emitted when the default limit and rate per second are set event DefaultLimitAndRatePerSecondSet(uint256 defaultLimit, uint256 defaultRatePerSecond); + /// @notice Emitted when the query fees are set + event QueryFeesSet(uint256 queryFees); + /// @notice Emitted when the finalize fees are set + event FinalizeFeesSet(uint256 finalizeFees); + /// @notice Emitted when the timeout fees are set + event TimeoutFeesSet(uint256 timeoutFees); + /// @notice Emitted when the call back fees are set + event CallBackFeesSet(uint256 callBackFees); error WatcherFeesNotSet(bytes32 limitType); @@ -167,18 +175,22 @@ contract WatcherPrecompileLimits is function setQueryFees(uint256 queryFees_) external onlyOwner { queryFees = queryFees_; + emit QueryFeesSet(queryFees_); } function setFinalizeFees(uint256 finalizeFees_) external onlyOwner { finalizeFees = finalizeFees_; + emit FinalizeFeesSet(finalizeFees_); } function setTimeoutFees(uint256 timeoutFees_) external onlyOwner { timeoutFees = timeoutFees_; + emit TimeoutFeesSet(timeoutFees_); } function setCallBackFees(uint256 callBackFees_) external onlyOwner { callBackFees = callBackFees_; + emit CallBackFeesSet(callBackFees_); } function getTotalFeesRequired( diff --git a/contracts/protocol/watcherPrecompile/core/WatcherPrecompile.sol b/contracts/protocol/watcherPrecompile/core/WatcherPrecompile.sol index 13e72e43..2898354c 100644 --- a/contracts/protocol/watcherPrecompile/core/WatcherPrecompile.sol +++ b/contracts/protocol/watcherPrecompile/core/WatcherPrecompile.sol @@ -278,9 +278,9 @@ contract WatcherPrecompile is RequestHandler { ) revert InvalidCallerTriggered(); IFeesManager(addressResolver__.feesManager()).assignWatcherPrecompileCreditsFromAddress( - watcherPrecompileLimits__.callBackFees(), - appGateway - ); + watcherPrecompileLimits__.callBackFees(), + appGateway + ); appGatewayCaller = appGateway; appGatewayCalled[params_[i].triggerId] = true; diff --git a/deployments/dev_addresses.json b/deployments/dev_addresses.json index a5ecf711..326f1ff2 100644 --- a/deployments/dev_addresses.json +++ b/deployments/dev_addresses.json @@ -1,52 +1,38 @@ { - "84532": { - "ContractFactoryPlug": "0xFEFdbD9CB5bdC58Aa8B6B455923454275392838c", - "FastSwitchboard": "0xCc9f995DAE2D3Cf3C0763e353986E97ab78801b4", - "FeesPlug": "0xBBff19fBEAd971f39F1B298De985D7ADfb57b784", - "Socket": "0x89e66357C5F101C56b4F9F97cf378Cc32A21438a", - "SocketBatcher": "0x3bABE35428D9E2B87d678289f837F805dAB0db3A", - "startBlock": 23827713 - }, "421614": { - "ContractFactoryPlug": "0x10BFD064258ac890957Ca65A85E7997a923Fb551", - "FastSwitchboard": "0xB0feE9136102B99A5722C693C8eb538C8c8d013B", - "FeesPlug": "0x0Ae8458F80a50a4ad706680605c88e050AaC8A89", - "Socket": "0xA99E6020d973C5956dBD727eDB45cDA5F7C4ca99", - "SocketBatcher": "0x3F95273234164329aec7DE66A037a80eb5a8F393", - "startBlock": 136387501 + "ContractFactoryPlug": "0x9dEa956E863a44a24c1CE068460E6190EA438602", + "FastSwitchboard": "0xb4C5A231614639801F421Ca386388f65576F3c81", + "FeesPlug": "0xFF3639fD99515b40d8f6bC02AC1Fead65CAd93fD", + "Socket": "0xBd0436A6E0dee11e9359767142Ed6bD7B48ba258", + "SocketBatcher": "0x1683c3AB4954852f71f400AbDeF98112a066ee44", + "startBlock": 148461456, + "TestUSDC": "0x3f134B047620590a0b7a2f98d5F9B07D32d4D927" }, "7625382": { - "AddressResolver": "0x491DE197D50aaa4F59090DBDa4b5Aa6C2E14A10D", - "AddressResolverImpl": "0x2736Fc0AA0fa5Ca595Ae5F27Ec807B912A5b1D0f", - "AuctionManager": "0x7187372e1fF5CB8E8B84Ee02F25033fc42B3D033", - "AuctionManagerImpl": "0xaE4624b006D7730f22De1F7df5b1C0b960262AE3", - "DeliveryHelper": "0x8b4a6cee33f18D757d7F3613476b135E3B889303", - "DeliveryHelperImpl": "0xE693bEc40e39223749AC351156E713b7256541B0", - "ERC1967Factory": "0x122beAFCfc2E99D825322a78EAFD8a11fa2d9E0b", - "FeesManager": "0x7c0922C2AfaBF9098F55710E8D8E3c8F81bCB8ee", - "FeesManagerImpl": "0x2c50B6e519e0705A396E5c8652E5D447F37f9796", - "startBlock": 2491495, - "WatcherPrecompile": "0x6E4c1afEcc1AbFF69dF3bC6bFf81eF7A34a343d5", - "WatcherPrecompileConfig": "0x95f86089D4015e6874031B3583dE8795C3b217Fd", - "WatcherPrecompileConfigImpl": "0xE4a2eBcE3Bdcaa1861c01ddc6465b90311B749e4", - "WatcherPrecompileImpl": "0x233539d6BBf231660652AF00B5d6E850E892946a", - "WatcherPrecompileLimits": "0x34212a2Cf92D2863F35877Ed835B7e28b8287764", - "WatcherPrecompileLimitsImpl": "0xdfeA8cb793b84b3f046d2426259e0eC237Ec9bF3" - }, - "11155111": { - "ContractFactoryPlug": "0xdd7b56968a3505D1A10181F2880cAA65a89E4750", - "FastSwitchboard": "0xb34DB19C7FAeECf14B3D0336C6E34f7dc1336968", - "FeesPlug": "0xfBa932AaE9Ae2777aEC77832FC0C2D9059C8E905", - "Socket": "0xF86B89B5c689c170BfD2734254228D6d2db5a672", - "SocketBatcher": "0x466b51bcc1799A4cb8F629C46640ab3aA2608F75", - "startBlock": 23827730 + "AddressResolver": "0x9EAa5b231c1DF8c5660dDC5fE7cD06a9D86e26f0", + "AddressResolverImpl": "0x4b067469E7865d9959E0E658BA77ec4b0F28FB15", + "AuctionManager": "0x2b1F13479D9D2E53E1487169b9C9073958710170", + "AuctionManagerImpl": "0x23364acdd298EBB3Dfd3c1835C5ACd7f77E3E2bD", + "DeliveryHelper": "0xe557Ba90Dd94Aa0Dd49DD6467f1e7d196C6Bd179", + "DeliveryHelperImpl": "0x915eA695e03265998cd455B4df2A1EAeb1b61e74", + "ERC1967Factory": "0xb30eBbA571721923175751AE7aF5aC90cfb1E892", + "FeesManager": "0xBf9529b5aA4a6a047Ff65CfAE9613A274C479143", + "FeesManagerImpl": "0xB577c29F7Cbb1bBB314dD8E74059Aa5BF72838b0", + "startBlock": 5537530, + "WatcherPrecompile": "0x68430a7f22125dd8b566f774AED05e868CA70fEA", + "WatcherPrecompileConfig": "0xD0F77272a5F0208f20c836bB4eeddbCE1e4aef9d", + "WatcherPrecompileConfigImpl": "0x060b4a50EcCC9Cf329005c94406dd2886676F759", + "WatcherPrecompileImpl": "0x1BCe40d84499Db8E7Bc65277A32f0abd56588CC7", + "WatcherPrecompileLimits": "0x4A645F050166FaBdA7ce44BE90B0A61073C19696", + "WatcherPrecompileLimitsImpl": "0x4Fd04B0D4903e630F169BB228be52750E6B5331a" }, "11155420": { - "ContractFactoryPlug": "0xDd73B7C6Bc8Cb4FFB3F0b460FF0985A91622f7E1", - "FastSwitchboard": "0x0CdaCA0B9F9bFfF1D9B660173BB8BE46c4fB71Da", - "FeesPlug": "0x95D672aaF036887aABEe72a6496D583317e6e48B", - "Socket": "0xDad99e0D8bA0ffe4955523ea0BCbe8F3DE3446D1", - "SocketBatcher": "0xb8D652C7D1dfA7578c6F119712c7b4c812BB3b57", - "startBlock": 25810565 + "ContractFactoryPlug": "0x95Be4D8500e3e5C970802c64b0755027d4Fc5C9F", + "FastSwitchboard": "0xe7858f1dc202f5E9C9B3ee6db052F45164a88534", + "FeesPlug": "0x01bDCAB43c423D08BaCe87ED716280536dAB3eF3", + "Socket": "0xE09CC429e77EE5DBeF68f3796b2A33BBDF39C03C", + "SocketBatcher": "0x9175d90706a2b17f0aE025ce5A6C76e64850c2f5", + "startBlock": 27158986, + "TestUSDC": "0x3D7515519beab77B541497626CFB7E764F6887CD" } } diff --git a/deployments/dev_verification.json b/deployments/dev_verification.json index cc9bb657..1bd53705 100644 --- a/deployments/dev_verification.json +++ b/deployments/dev_verification.json @@ -41,11 +41,63 @@ "0x89e66357C5F101C56b4F9F97cf378Cc32A21438a", "Socket", "contracts/protocol/socket/Socket.sol", - [84532, "0x3339Cf48f1F9cf31b6F8c2664d144c7444eBBB18", "EVMX"] + [ + 84532, + "0x3339Cf48f1F9cf31b6F8c2664d144c7444eBBB18", + "EVMX" + ] ] ], "421614": [], "7625382": [ + [ + "0x23364acdd298EBB3Dfd3c1835C5ACd7f77E3E2bD", + "AuctionManager", + "contracts/protocol/payload-delivery/AuctionManager.sol", + [] + ], + [ + "0x915eA695e03265998cd455B4df2A1EAeb1b61e74", + "DeliveryHelper", + "contracts/protocol/payload-delivery/app-gateway/DeliveryHelper.sol", + [] + ], + [ + "0xB577c29F7Cbb1bBB314dD8E74059Aa5BF72838b0", + "FeesManager", + "contracts/protocol/payload-delivery/FeesManager.sol", + [] + ], + [ + "0x1BCe40d84499Db8E7Bc65277A32f0abd56588CC7", + "WatcherPrecompile", + "contracts/protocol/watcherPrecompile/core/WatcherPrecompile.sol", + [] + ], + [ + "0x060b4a50EcCC9Cf329005c94406dd2886676F759", + "WatcherPrecompileConfig", + "contracts/protocol/watcherPrecompile/WatcherPrecompileConfig.sol", + [] + ], + [ + "0x4Fd04B0D4903e630F169BB228be52750E6B5331a", + "WatcherPrecompileLimits", + "contracts/protocol/watcherPrecompile/WatcherPrecompileLimits.sol", + [] + ], + [ + "0x4b067469E7865d9959E0E658BA77ec4b0F28FB15", + "AddressResolver", + "contracts/protocol/AddressResolver.sol", + [] + ], + [ + "0xb30eBbA571721923175751AE7aF5aC90cfb1E892", + "ERC1967Factory", + "lib/solady/src/utils/ERC1967Factory.sol", + [] + ], [ "0x2c50B6e519e0705A396E5c8652E5D447F37f9796", "FeesManager", @@ -155,7 +207,11 @@ "0xF86B89B5c689c170BfD2734254228D6d2db5a672", "Socket", "contracts/protocol/socket/Socket.sol", - [11155111, "0x3339Cf48f1F9cf31b6F8c2664d144c7444eBBB18", "EVMX"] + [ + 11155111, + "0x3339Cf48f1F9cf31b6F8c2664d144c7444eBBB18", + "EVMX" + ] ] ], "11155420": [] diff --git a/hardhat-scripts/config/config.ts b/hardhat-scripts/config/config.ts index d7236e79..cdd6ad33 100644 --- a/hardhat-scripts/config/config.ts +++ b/hardhat-scripts/config/config.ts @@ -1,6 +1,6 @@ import { config as dotenvConfig } from "dotenv"; dotenvConfig(); -import { ethers } from "ethers"; +import { ethers, utils } from "ethers"; import { ChainSlug, DeploymentMode } from "../../src"; export const mode = process.env.DEPLOYMENT_MODE as @@ -26,8 +26,8 @@ export const logConfig = () => { export const chains: Array = [ ChainSlug.ARBITRUM_SEPOLIA, ChainSlug.OPTIMISM_SEPOLIA, - ChainSlug.BASE_SEPOLIA, - ChainSlug.SEPOLIA, + // ChainSlug.BASE_SEPOLIA, + // ChainSlug.SEPOLIA, ]; export const EVM_CHAIN_ID_MAP: Record = { [DeploymentMode.LOCAL]: 7625382, @@ -35,13 +35,34 @@ export const EVM_CHAIN_ID_MAP: Record = { [DeploymentMode.STAGE]: 43, [DeploymentMode.PROD]: 3605, }; -export const auctionEndDelaySeconds = 0; +// Addresses export const watcher = "0xb62505feacC486e809392c65614Ce4d7b051923b"; export const transmitter = "0x138e9840861C983DC0BB9b3e941FB7C0e9Ade320"; -export const MAX_FEES = ethers.utils.parseEther("0.001"); + +// Chain config export const EVMX_CHAIN_ID = EVM_CHAIN_ID_MAP[mode]; +export const MAX_FEES = ethers.utils.parseEther("0.001"); + +// Auction parameters +export const auctionEndDelaySeconds = 0; +export const BID_TIMEOUT = 600; // 10 minutes +export const EXPIRY_TIME = 300; // 5 minutes +export const MAX_RE_AUCTION_COUNT = 5; + +// TestUSDC +export const TEST_USDC_NAME = "testUSDC"; +export const TEST_USDC_SYMBOL = "testUSDC"; +export const TEST_USDC_INITIAL_SUPPLY = ethers.utils.parseEther( + "1000000000000000000000000" +); +export const TEST_USDC_DECIMALS = 6; + +// Watcher Precompile Fees +export const QUERY_FEES = utils.parseEther("0.000001"); +export const FINALIZE_FEES = utils.parseEther("0.000001"); +export const TIMEOUT_FEES = utils.parseEther("0.000001"); +export const CALLBACK_FEES = utils.parseEther("0.000001"); + +// Other constants export const DEFAULT_MAX_LIMIT = 100; -export const BID_TIMEOUT = 600; -export const EXPIRY_TIME = 300; export const UPGRADE_VERSION = 1; -export const MAX_RE_AUCTION_COUNT = 5; diff --git a/hardhat-scripts/constants/enums.ts b/hardhat-scripts/constants/enums.ts index d7707602..011570b2 100644 --- a/hardhat-scripts/constants/enums.ts +++ b/hardhat-scripts/constants/enums.ts @@ -4,6 +4,8 @@ export enum CORE_CONTRACTS { FastSwitchboard = "FastSwitchboard", FeesPlug = "FeesPlug", ContractFactoryPlug = "ContractFactoryPlug", + TestUSDC = "TestUSDC", + SocketFeeManager = "SocketFeeManager", } export enum EVMxCoreContracts { diff --git a/hardhat-scripts/deploy/1.deploy.ts b/hardhat-scripts/deploy/1.deploy.ts index bc3c6715..892ac0a9 100644 --- a/hardhat-scripts/deploy/1.deploy.ts +++ b/hardhat-scripts/deploy/1.deploy.ts @@ -1,6 +1,6 @@ import { ChainAddressesObj, ChainSlug } from "../../src"; import { config } from "dotenv"; -import { Contract, Signer, utils, Wallet } from "ethers"; +import { BigNumber, Contract, Signer, utils, Wallet } from "ethers"; import { formatEther } from "ethers/lib/utils"; import { ethers } from "hardhat"; import { @@ -13,6 +13,7 @@ import { import { DeployParams, getAddresses, + getInstance, getOrDeploy, storeAddresses, } from "../utils"; @@ -27,6 +28,14 @@ import { DEFAULT_MAX_LIMIT, MAX_RE_AUCTION_COUNT, mode, + TEST_USDC_INITIAL_SUPPLY, + TEST_USDC_DECIMALS, + TEST_USDC_NAME, + TEST_USDC_SYMBOL, + QUERY_FEES, + FINALIZE_FEES, + TIMEOUT_FEES, + CALLBACK_FEES, } from "../config/config"; config(); @@ -131,7 +140,7 @@ const deployEVMxContracts = async () => { deployUtils = await deployContractWithProxy( EVMxCoreContracts.WatcherPrecompile, - `contracts/protocol/watcherPrecompile/WatcherPrecompile.sol`, + `contracts/protocol/watcherPrecompile/core/WatcherPrecompile.sol`, [ EVMxOwner, addressResolver.address, @@ -215,6 +224,44 @@ const deployEVMxContracts = async () => { deployUtils.signer ); + let watcherPrecompileLimits = await getInstance( + EVMxCoreContracts.WatcherPrecompileLimits, + deployUtils.addresses[EVMxCoreContracts.WatcherPrecompileLimits] + ); + watcherPrecompileLimits = watcherPrecompileLimits.connect( + deployUtils.signer + ); + await updateContractSettings( + watcherPrecompileLimits, + "queryFees", + "setQueryFees", + QUERY_FEES, + deployUtils.signer + ); + + await updateContractSettings( + watcherPrecompileLimits, + "finalizeFees", + "setFinalizeFees", + FINALIZE_FEES, + deployUtils.signer + ); + + await updateContractSettings( + watcherPrecompileLimits, + "timeoutFees", + "setTimeoutFees", + TIMEOUT_FEES, + deployUtils.signer + ); + + await updateContractSettings( + watcherPrecompileLimits, + "callBackFees", + "setCallBackFees", + CALLBACK_FEES, + deployUtils.signer + ); deployUtils.addresses.startBlock = (deployUtils.addresses.startBlock ? deployUtils.addresses.startBlock @@ -288,6 +335,23 @@ const deploySocketContracts = async () => { ); deployUtils.addresses[contractName] = sb.address; + contractName = CORE_CONTRACTS.TestUSDC; + + const testUSDC: Contract = await getOrDeploy( + contractName, + contractName, + `contracts/helpers/${contractName}.sol`, + [ + TEST_USDC_NAME, + TEST_USDC_SYMBOL, + TEST_USDC_DECIMALS, + socketOwner, + TEST_USDC_INITIAL_SUPPLY, + ], + deployUtils + ); + deployUtils.addresses[contractName] = testUSDC.address; + contractName = CORE_CONTRACTS.FeesPlug; const feesPlug: Contract = await getOrDeploy( contractName, @@ -298,6 +362,8 @@ const deploySocketContracts = async () => { ); deployUtils.addresses[contractName] = feesPlug.address; + await whitelistToken(feesPlug, testUSDC.address, deployUtils.signer); + contractName = CORE_CONTRACTS.ContractFactoryPlug; const contractFactoryPlug: Contract = await getOrDeploy( contractName, @@ -328,24 +394,20 @@ const deploySocketContracts = async () => { } }; -async function initializeSigVerifier( - contract: Contract, - getterMethod: string, - setterMethod: string, - requiredAddress: string, - initParams: any[], +async function whitelistToken( + feesPlug: Contract, + tokenAddress: string, signer: Signer ) { - const currentValue = await contract.connect(signer)[getterMethod](); - - if (currentValue.toLowerCase() !== requiredAddress.toLowerCase()) { - console.log({ - setterMethod, - current: currentValue, - required: requiredAddress, - }); - const tx = await contract.connect(signer)[setterMethod](...initParams); - console.log(`Setting ${getterMethod} for ${contract.address} to`, tx.hash); + const isWhitelisted = await feesPlug + .connect(signer) + .whitelistedTokens(tokenAddress); + if (!isWhitelisted) { + const tx = await feesPlug.connect(signer).whitelistToken(tokenAddress); + console.log( + `Whitelisting token ${tokenAddress} for ${feesPlug.address}`, + tx.hash + ); await tx.wait(); } } @@ -354,18 +416,22 @@ async function updateContractSettings( contract: Contract, getterMethod: string, setterMethod: string, - requiredAddress: string, + requiredValue: string | BigNumber, signer: Signer ) { const currentValue = await contract.connect(signer)[getterMethod](); - if (currentValue.toLowerCase() !== requiredAddress.toLowerCase()) { + if ( + (typeof currentValue === "string" && + currentValue.toLowerCase() !== String(requiredValue).toLowerCase()) || + (BigNumber.isBigNumber(currentValue) && currentValue !== requiredValue) + ) { console.log({ setterMethod, current: currentValue, - required: requiredAddress, + required: requiredValue, }); - const tx = await contract.connect(signer)[setterMethod](requiredAddress); + const tx = await contract.connect(signer)[setterMethod](requiredValue); console.log(`Setting ${getterMethod} for ${contract.address} to`, tx.hash); await tx.wait(); } diff --git a/hardhat-scripts/deploy/4.connect.ts b/hardhat-scripts/deploy/4.connect.ts index 1b0bfd84..dd51974e 100644 --- a/hardhat-scripts/deploy/4.connect.ts +++ b/hardhat-scripts/deploy/4.connect.ts @@ -16,22 +16,25 @@ import { getWatcherSigner, signWatcherMessage } from "../utils/sign"; const plugs = [CORE_CONTRACTS.ContractFactoryPlug, CORE_CONTRACTS.FeesPlug]; export type AppGatewayConfig = { plug: string; - appGateway: string; + appGatewayId: string; switchboard: string; chainSlug: number; }; // Maps plug contracts to their corresponding app gateways -export const getAppGateway = (plug: string, addresses: DeploymentAddresses) => { +export const getAppGatewayId = ( + plug: string, + addresses: DeploymentAddresses +) => { let address: string = ""; switch (plug) { case CORE_CONTRACTS.ContractFactoryPlug: address = addresses?.[EVMX_CHAIN_ID]?.[EVMxCoreContracts.DeliveryHelper]; if (!address) throw new Error(`DeliveryHelper not found on EVMX`); - return address; + return ethers.utils.hexZeroPad(address, 32); case CORE_CONTRACTS.FeesPlug: address = addresses?.[EVMX_CHAIN_ID]?.[EVMxCoreContracts.FeesManager]; if (!address) throw new Error(`FeesManager not found on EVMX`); - return address; + return ethers.utils.hexZeroPad(address, 32); default: throw new Error(`Unknown plug: ${plug}`); } @@ -52,13 +55,13 @@ export const checkIfAddressExists = (address: string, name: string) => { export const isConfigSetOnSocket = async ( plug: Contract, socket: Contract, - appGateway: string, + appGatewayId: string, switchboard: string ) => { const plugConfigRegistered = await socket.getPlugConfig(plug.address); return ( - plugConfigRegistered.appGateway.toLowerCase() === - appGateway.toLowerCase() && + plugConfigRegistered.appGatewayId.toLowerCase() === + appGatewayId.toLowerCase() && plugConfigRegistered.switchboard.toLowerCase() === switchboard.toLowerCase() ); }; @@ -84,22 +87,21 @@ async function connectPlug( // Get switchboard and app gateway addresses const switchboard = addr[CORE_CONTRACTS.FastSwitchboard]; checkIfAddressExists(switchboard, "Switchboard"); - const appGateway = getAppGateway(plugContract, addresses); - checkIfAddressExists(appGateway, "AppGateway"); + const appGatewayId = getAppGatewayId(plugContract, addresses); // Check if config is already set - if (await isConfigSetOnSocket(plug, socket, appGateway, switchboard)) { + if (await isConfigSetOnSocket(plug, socket, appGatewayId, switchboard)) { console.log(`${plugContract} Socket Config on ${chain} already set!`); return; } // Connect the plug const tx = await plug.functions["connectSocket"]( - appGateway, + appGatewayId, socket.address, switchboard ); console.log( - `Connecting ${plugContract} on ${chain} to ${appGateway} tx hash: ${tx.hash}` + `Connecting ${plugContract} on ${chain} to ${appGatewayId} tx hash: ${tx.hash}` ); await tx.wait(); } @@ -160,17 +162,17 @@ export const updateConfigEVMx = async () => { const addr = addresses[chain]!; for (const plugContract of plugs) { - const appGateway = getAppGateway(plugContract, addresses); + const appGatewayId = getAppGatewayId(plugContract, addresses); const switchboard = addr[CORE_CONTRACTS.FastSwitchboard]; checkIfAddressExists(switchboard, "Switchboard"); - checkIfAddressExists(appGateway, "AppGateway"); + checkIfAddressExists(appGatewayId, "AppGateway"); if ( await isConfigSetOnEVMx( watcherPrecompileConfig, chain, addr[plugContract], - appGateway, + appGatewayId, switchboard ) ) { @@ -179,7 +181,7 @@ export const updateConfigEVMx = async () => { } appConfigs.push({ plug: addr[plugContract], - appGateway, + appGatewayId: appGatewayId, switchboard: addr[CORE_CONTRACTS.FastSwitchboard], chainSlug: chain, }); @@ -193,7 +195,7 @@ export const updateConfigEVMx = async () => { const encodedMessage = ethers.utils.defaultAbiCoder.encode( [ "bytes4", - "tuple(address plug,address appGateway,address switchboard,uint32 chainSlug)[]", + "tuple(address plug,bytes32 appGatewayId,address switchboard,uint32 chainSlug)[]", ], [ watcherPrecompileConfig.interface.getSighash("setAppGateways"), diff --git a/package.json b/package.json index 2610da7a..3ed39c3b 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "publishConfig": { "access": "public" }, - "version": "1.1.11", + "version": "1.1.12", "description": "socket protocol", "scripts": { "build": "yarn abi && tsc --project lib.tsconfig.json",