Skip to content

Commit f3f501e

Browse files
authored
Merge pull request #75 from SocketDotTech/dev
Devnet update
2 parents b47bfd1 + 934370a commit f3f501e

File tree

142 files changed

+5861
-5022
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+5861
-5022
lines changed

.env.sample

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# RPCs
22
EVMX_RPC="https://rpc-evmx-devnet.socket.tech/"
3-
SEPOLIA_RPC="https://rpc.ankr.com/eth_sepolia/"
4-
ARBITRUM_SEPOLIA_RPC="https://rpc.ankr.com/arbitrum_sepolia"
5-
OPTIMISM_SEPOLIA_RPC="https://rpc.ankr.com/optimism_sepolia"
6-
BASE_SEPOLIA_RPC="https://rpc.ankr.com/base_sepolia"
3+
SEPOLIA_RPC="https://ethereum-sepolia-rpc.publicnode.com"
4+
ARBITRUM_SEPOLIA_RPC="https://sepolia-rollup.arbitrum.io/rpc"
5+
OPTIMISM_SEPOLIA_RPC="https://sepolia.optimism.io"
6+
BASE_SEPOLIA_RPC="https://sepolia.base.org"
77

88
# EVMx key addresses
99
# Find the most up to date addresses at:
1010
# https://github.com/SocketDotTech/socket-protocol/blob/master/deployments/stage_addresses.json
11-
ADDRESS_RESOLVER="0xf3046B22F98C25305E8040286fB1b33378BA10a1"
12-
FEES_MANAGER="0x603723100172D30171B7Fd9870ba80F8baf6FaD4"
13-
ARBITRUM_FEES_PLUG="0x89324F93d852cB4fcDC4Ee202456be466ce096bb"
11+
ADDRESS_RESOLVER="0x4846430BB142385e581C894AE92a4CF0722aEC21"
12+
FEES_MANAGER="0x9745623Aaa299500F93d2B1B4Efb7b3EC5e60FFc"
13+
ARBITRUM_FEES_PLUG="0x9E263f6c7C199d9c147E30764A8cae1175184CB8"
1414

1515
# Add your deployer private key here
1616
# or remove it from this file if it is already an env var

.github/workflows/forge-test.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,11 @@ jobs:
3737
run: |
3838
forge --version
3939
40-
- name: Run Forge build
41-
run: |
42-
forge build --sizes
43-
id: build
44-
4540
- name: Run Forge tests
4641
run: |
47-
forge test -vvv
42+
forge test
4843
id: test
4944

50-
- name: Run coverage
51-
run: |
52-
forge coverage
53-
id: coverage
54-
5545
- name: Run snapshot
5646
run: |
5747
forge snapshot

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ broadcast/
2525
.gas-snapshot
2626

2727
.cursorrules
28+
29+
deployments/local_addresses.json
30+
deployments/local_verification.json
31+
32+
testScript.sh

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ scratchpad
1717
.gitmodules
1818
.prettierignore
1919
deploy.sh
20+
publish.sh
21+
2022
foundry.toml
2123
LICENSE
2224
remappings.txt

Errors.md

Lines changed: 137 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,177 +1,202 @@
11
# Custom Error Codes
22

3-
43
## base/PlugBase.sol
54

6-
| Error | Signature |
7-
|-------|-----------|
5+
| Error | Signature |
6+
| ---------------------------- | ------------ |
87
| `SocketAlreadyInitialized()` | `0xc9500b00` |
98

9+
## interfaces/IWatcherPrecompile.sol
10+
11+
| Error | Signature |
12+
| --------------------------- | ------------ |
13+
| `InvalidChainSlug()` | `0xbff6b106` |
14+
| `InvalidConnection()` | `0x63228f29` |
15+
| `InvalidTransmitter()` | `0x58a70a0a` |
16+
| `InvalidTimeoutRequest()` | `0x600ca372` |
17+
| `InvalidPayloadId()` | `0xfa0b8c86` |
18+
| `InvalidCaller()` | `0x48f5c3ed` |
19+
| `InvalidGateway()` | `0xfc9dfe85` |
20+
| `InvalidSwitchboard()` | `0xf63c9e4d` |
21+
| `RequestAlreadyCancelled()` | `0xc70f47d8` |
22+
| `RequestCancelled()` | `0xe3cf2258` |
23+
| `AlreadyStarted()` | `0x1fbde445` |
24+
| `InvalidLevelNumber()` | `0x5022f14b` |
25+
26+
## interfaces/IWatcherPrecompileLimits.sol
27+
28+
| Error | Signature |
29+
| ------------------------------------------------ | ------------ |
30+
| `ActionNotSupported(address,bytes32)` | `0xa219158f` |
31+
| `NotDeliveryHelper()` | `0x29029c67` |
32+
| `LimitExceeded(address,bytes32,uint256,uint256)` | `0x80bb2621` |
33+
1034
## protocol/AddressResolver.sol
1135

12-
| Error | Signature |
13-
|-------|-----------|
36+
| Error | Signature |
37+
| ---------------------------- | ------------ |
1438
| `InvalidAppGateway(address)` | `0x0e66940d` |
1539

1640
## protocol/AsyncPromise.sol
1741

18-
| Error | Signature |
19-
|-------|-----------|
20-
| `PromiseAlreadyResolved()` | `0x56b63537` |
42+
| Error | Signature |
43+
| ------------------------------- | ------------ |
44+
| `PromiseAlreadyResolved()` | `0x56b63537` |
2145
| `OnlyForwarderOrLocalInvoker()` | `0xa9fb0b28` |
22-
| `PromiseAlreadySetUp()` | `0x927c53d5` |
23-
| `PromiseRevertFailed()` | `0x0175b9de` |
46+
| `PromiseAlreadySetUp()` | `0x927c53d5` |
47+
| `PromiseRevertFailed()` | `0x0175b9de` |
2448

2549
## protocol/Forwarder.sol
2650

27-
| Error | Signature |
28-
|-------|-----------|
51+
| Error | Signature |
52+
| ------------------------ | ------------ |
2953
| `AsyncModifierNotUsed()` | `0xb9521e1a` |
3054

55+
## protocol/payload-delivery/AuctionManager.sol
56+
57+
| Error | Signature |
58+
| ---------------------------- | ------------ |
59+
| `InvalidBid()` | `0xc6388ef7` |
60+
| `MaxReAuctionCountReached()` | `0xf2b4388c` |
61+
3162
## protocol/payload-delivery/ContractFactoryPlug.sol
3263

33-
| Error | Signature |
34-
|-------|-----------|
35-
| `DeploymentFailed()` | `0x30116425` |
36-
| `ExecutionFailed()` | `0xacfdb444` |
64+
| Error | Signature |
65+
| ------------------------- | ------------ |
66+
| `DeploymentFailed()` | `0x30116425` |
67+
| `ExecutionFailed()` | `0xacfdb444` |
3768
| `information(bool,bytes)` | `0x1a5c6d63` |
3869

3970
## protocol/payload-delivery/FeesManager.sol
4071

41-
| Error | Signature |
42-
|-------|-----------|
72+
| Error | Signature |
73+
| ----------------------------- | ------------ |
4374
| `InsufficientFeesAvailable()` | `0x51488f54` |
44-
| `NoFeesForTransmitter()` | `0x248bac55` |
45-
| `NoFeesBlocked()` | `0x116d68f9` |
46-
| `InvalidWatcherSignature()` | `0x5029f14f` |
47-
| `NonceUsed()` | `0x1f6d5aef` |
75+
| `NoFeesForTransmitter()` | `0x248bac55` |
76+
| `NoFeesBlocked()` | `0x116d68f9` |
77+
| `InvalidWatcherSignature()` | `0x5029f14f` |
78+
| `NonceUsed()` | `0x1f6d5aef` |
79+
| `InvalidCaller()` | `0x48f5c3ed` |
4880

4981
## protocol/payload-delivery/FeesPlug.sol
5082

51-
| Error | Signature |
52-
|-------|-----------|
53-
| `FeesAlreadyPaid()` | `0xd3b1ad69` |
83+
| Error | Signature |
84+
| ----------------------------------- | ------------ |
85+
| `FeesAlreadyPaid()` | `0xd3b1ad69` |
5486
| `InsufficientTokenBalance(address)` | `0x642faafa` |
55-
| `InvalidDepositAmount()` | `0xfe9ba5cd` |
56-
| `TokenNotWhitelisted(address)` | `0xea3bff2e` |
87+
| `InvalidDepositAmount()` | `0xfe9ba5cd` |
88+
| `TokenNotWhitelisted(address)` | `0xea3bff2e` |
5789

58-
## protocol/payload-delivery/app-gateway/BatchAsync.sol
90+
## protocol/payload-delivery/app-gateway/DeliveryUtils.sol
5991

60-
| Error | Signature |
61-
|-------|-----------|
92+
| Error | Signature |
93+
| ----------------------- | ------------ |
6294
| `AllPayloadsExecuted()` | `0x6bc43bfe` |
63-
| `NotFromForwarder()` | `0xe83aa6bd` |
64-
| `CallFailed(bytes32)` | `0xe22e3683` |
65-
| `PayloadTooLarge()` | `0x492f620d` |
66-
| `OnlyAppGateway()` | `0xfec944ea` |
67-
| `WinningBidExists()` | `0xe8733654` |
68-
| `InsufficientFees()` | `0x8d53e553` |
95+
| `NotFromForwarder()` | `0xe83aa6bd` |
96+
| `CallFailed(bytes32)` | `0xe22e3683` |
97+
| `PayloadTooLarge()` | `0x492f620d` |
98+
| `OnlyAppGateway()` | `0xfec944ea` |
99+
| `WinningBidExists()` | `0xe8733654` |
100+
| `InsufficientFees()` | `0x8d53e553` |
101+
| `ReadOnlyRequests()` | `0x5f16b0e6` |
69102

70103
## protocol/socket/Socket.sol
71104

72-
| Error | Signature |
73-
|-------|-----------|
105+
| Error | Signature |
106+
| ----------------------------------------- | ------------ |
74107
| `PayloadAlreadyExecuted(ExecutionStatus)` | `0xf4c54edd` |
75-
| `VerificationFailed()` | `0x439cc0cd` |
76-
| `LowGasLimit()` | `0xd38edae0` |
77-
| `InvalidSlug()` | `0x290a8315` |
78-
| `DeadlinePassed()` | `0x70f65caa` |
108+
| `VerificationFailed()` | `0x439cc0cd` |
109+
| `LowGasLimit()` | `0xd38edae0` |
110+
| `InvalidSlug()` | `0x290a8315` |
111+
| `DeadlinePassed()` | `0x70f65caa` |
79112

80113
## protocol/socket/SocketConfig.sol
81114

82-
| Error | Signature |
83-
|-------|-----------|
84-
| `SwitchboardExists()` | `0x2dff8555` |
85-
| `InvalidConnection()` | `0x63228f29` |
86-
| `InvalidSwitchboard()` | `0xf63c9e4d` |
115+
| Error | Signature |
116+
| ------------------------------- | ------------ |
117+
| `InvalidConnection()` | `0x63228f29` |
118+
| `InvalidSwitchboard()` | `0xf63c9e4d` |
119+
| `SwitchboardExists()` | `0x2dff8555` |
87120
| `SwitchboardExistsOrDisabled()` | `0x1c7d2487` |
88121

89122
## protocol/socket/SocketUtils.sol
90123

91-
| Error | Signature |
92-
|-------|-----------|
124+
| Error | Signature |
125+
| ---------------------- | ------------ |
93126
| `InvalidTransmitter()` | `0x58a70a0a` |
94127

95128
## protocol/socket/switchboard/FastSwitchboard.sol
96129

97-
| Error | Signature |
98-
|-------|-----------|
130+
| Error | Signature |
131+
| ------------------- | ------------ |
99132
| `AlreadyAttested()` | `0x35d90805` |
100133
| `WatcherNotFound()` | `0xa278e4ad` |
101134

102135
## protocol/socket/switchboard/SwitchboardBase.sol
103136

104-
| Error | Signature |
105-
|-------|-----------|
137+
| Error | Signature |
138+
| ---------------- | ------------ |
106139
| `InvalidNonce()` | `0x756688fe` |
107140

108141
## protocol/utils/AccessControl.sol
109142

110-
| Error | Signature |
111-
|-------|-----------|
143+
| Error | Signature |
144+
| ------------------- | ------------ |
112145
| `NoPermit(bytes32)` | `0x962f6333` |
113146

114147
## protocol/utils/AddressResolverUtil.sol
115148

116-
| Error | Signature |
117-
|-------|-----------|
118-
| `OnlyPayloadDelivery()` | `0x7ccc3a43` |
119-
| `OnlyWatcherPrecompile()` | `0x663a892a` |
149+
| Error | Signature |
150+
| ----------------------------------------- | ------------ |
151+
| `OnlyPayloadDelivery()` | `0x7ccc3a43` |
152+
| `OnlyWatcherPrecompile()` | `0x663a892a` |
153+
| `OnlyWatcherPrecompileOrDeliveryHelper()` | `0xe93a2814` |
120154

121155
## protocol/utils/common/Errors.sol
122156

123-
| Error | Signature |
124-
|-------|-----------|
125-
| `NotAuthorized()` | `0xea8e4eb5` |
126-
| `NotBridge()` | `0x7fea9dc5` |
127-
| `NotSocket()` | `0xc59f8f7c` |
128-
| `ConnectorUnavailable()` | `0xb1efb84a` |
129-
| `InvalidTokenContract()` | `0x29bdfb34` |
130-
| `ZeroAddressReceiver()` | `0x96bbcf1e` |
131-
| `ZeroAddress()` | `0xd92e233d` |
132-
| `ZeroAmount()` | `0x1f2a2005` |
133-
| `InsufficientFunds()` | `0x356680b7` |
134-
| `InvalidSigner()` | `0x815e1d64` |
135-
| `InvalidFunction()` | `0xdb2079c3` |
136-
| `TimeoutDelayTooLarge()` | `0xc10bfe64` |
137-
| `TimeoutAlreadyResolved()` | `0x7dc8be06` |
157+
| Error | Signature |
158+
| ---------------------------- | ------------ |
159+
| `NotAuthorized()` | `0xea8e4eb5` |
160+
| `NotBridge()` | `0x7fea9dc5` |
161+
| `NotSocket()` | `0xc59f8f7c` |
162+
| `ConnectorUnavailable()` | `0xb1efb84a` |
163+
| `InvalidTokenContract()` | `0x29bdfb34` |
164+
| `ZeroAddressReceiver()` | `0x96bbcf1e` |
165+
| `ZeroAddress()` | `0xd92e233d` |
166+
| `ZeroAmount()` | `0x1f2a2005` |
167+
| `InsufficientFunds()` | `0x356680b7` |
168+
| `InvalidSigner()` | `0x815e1d64` |
169+
| `InvalidFunction()` | `0xdb2079c3` |
170+
| `TimeoutDelayTooLarge()` | `0xc10bfe64` |
171+
| `TimeoutAlreadyResolved()` | `0x7dc8be06` |
138172
| `ResolvingTimeoutTooEarly()` | `0x28fd4c50` |
139-
| `LimitReached()` | `0x3dd19101` |
140-
| `FeesAlreadyPaid()` | `0xd3b1ad69` |
141-
| `NotAuctionManager()` | `0x87944c26` |
142-
| `CallFailed()` | `0x3204506f` |
143-
| `PlugDisconnected()` | `0xe741bafb` |
144-
| `InvalidAppGateway()` | `0x82ded261` |
145-
| `AppGatewayAlreadyCalled()` | `0xb224683f` |
146-
| `InvalidInboxCaller()` | `0x4f1aa61e` |
147-
| `PromisesNotResolved()` | `0xb91dbe7d` |
148-
| `InvalidPromise()` | `0x45f2d176` |
149-
| `InvalidIndex()` | `0x63df8171` |
150-
| `InvalidTransmitter()` | `0x58a70a0a` |
151-
| `FeesNotSet()` | `0x2a831034` |
152-
| `InvalidTokenAddress()` | `0x1eb00b06` |
173+
| `LimitReached()` | `0x3dd19101` |
174+
| `FeesAlreadyPaid()` | `0xd3b1ad69` |
175+
| `NotAuctionManager()` | `0x87944c26` |
176+
| `CallFailed()` | `0x3204506f` |
177+
| `PlugDisconnected()` | `0xe741bafb` |
178+
| `InvalidAppGateway()` | `0x82ded261` |
179+
| `AppGatewayAlreadyCalled()` | `0xb224683f` |
180+
| `InvalidInboxCaller()` | `0x4f1aa61e` |
181+
| `PromisesNotResolved()` | `0xb91dbe7d` |
182+
| `InvalidPromise()` | `0x45f2d176` |
183+
| `InvalidIndex()` | `0x63df8171` |
184+
| `InvalidTransmitter()` | `0x58a70a0a` |
185+
| `FeesNotSet()` | `0x2a831034` |
186+
| `InvalidTokenAddress()` | `0x1eb00b06` |
187+
| `InvalidWatcherSignature()` | `0x5029f14f` |
188+
| `NonceUsed()` | `0x1f6d5aef` |
189+
| `AuctionClosed()` | `0x36b6b46d` |
190+
| `AuctionAlreadyStarted()` | `0x628e3883` |
191+
| `BidExceedsMaxFees()` | `0x4c923f3c` |
192+
| `LowerBidAlreadyExists()` | `0xaaa1f709` |
193+
| `AsyncModifierNotUsed()` | `0xb9521e1a` |
194+
195+
## protocol/watcherPrecompile/WatcherPrecompileConfig.sol
196+
197+
| Error | Signature |
198+
| --------------------------- | ------------ |
199+
| `InvalidGateway()` | `0xfc9dfe85` |
200+
| `InvalidSwitchboard()` | `0xf63c9e4d` |
201+
| `NonceUsed()` | `0x1f6d5aef` |
153202
| `InvalidWatcherSignature()` | `0x5029f14f` |
154-
| `NonceUsed()` | `0x1f6d5aef` |
155-
| `AuctionClosed()` | `0x36b6b46d` |
156-
| `AuctionAlreadyStarted()` | `0x628e3883` |
157-
| `BidExceedsMaxFees()` | `0x4c923f3c` |
158-
| `LowerBidAlreadyExists()` | `0xaaa1f709` |
159-
160-
## protocol/watcherPrecompile/WatcherPrecompile.sol
161-
162-
| Error | Signature |
163-
|-------|-----------|
164-
| `InvalidChainSlug()` | `0xbff6b106` |
165-
| `InvalidConnection()` | `0x63228f29` |
166-
| `InvalidTransmitter()` | `0x58a70a0a` |
167-
| `InvalidTimeoutRequest()` | `0x600ca372` |
168-
| `InvalidPayloadId()` | `0xfa0b8c86` |
169-
| `InvalidCaller()` | `0x48f5c3ed` |
170-
171-
## protocol/watcherPrecompile/WatcherPrecompileLimits.sol
172-
173-
| Error | Signature |
174-
|-------|-----------|
175-
| `ActionNotSupported(address,bytes32)` | `0xa219158f` |
176-
| `NotDeliveryHelper()` | `0x29029c67` |
177-
| `LimitExceeded(address,bytes32,uint256,uint256)` | `0x80bb2621` |

0 commit comments

Comments
 (0)