Skip to content

Commit 2efd512

Browse files
[eth] Deploy to arbitrum-testnet (#436)
* add arbitrum-testnet contract * Fix format issues Co-authored-by: Ali Behjati <[email protected]>
1 parent afd4a8b commit 2efd512

File tree

6 files changed

+400
-2
lines changed

6 files changed

+400
-2
lines changed

ethereum/.env.prod.arbitrum_testnet

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
MIGRATIONS_DIR=./migrations/prod
2+
MIGRATIONS_NETWORK=arbitrum_testnet
3+
WORMHOLE_CHAIN_NAME=arbitrum
4+
CLUSTER=testnet
5+
VALID_TIME_PERIOD_SECONDS=60
Lines changed: 367 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,367 @@
1+
{
2+
"manifestVersion": "3.2",
3+
"proxies": [
4+
{
5+
"address": "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C",
6+
"txHash": "0x6607a105ce4026177c4a2876df0d5965c895b4664be76733e2c791e323aafd0e",
7+
"kind": "uups"
8+
},
9+
{
10+
"address": "0x939C0e902FF5B3F7BA666Cc8F6aC75EE76d3f900",
11+
"txHash": "0x6524ab2ded6d40c74fd5a008a84813c196325a2baca64bcb989528acef499b31",
12+
"kind": "uups"
13+
}
14+
],
15+
"impls": {
16+
"fd85319df5664c4344cfee5e5680ccc4a692989c690fefaf0d6f65f782b5459f": {
17+
"address": "0xB2eeb93D778c364E7E2274D6299e2aa0c2Bea090",
18+
"txHash": "0x768858ddc4ac5c791413d202ba10e91c0c83625457528bb59dc4df82b3e1260a",
19+
"layout": {
20+
"storage": [
21+
{
22+
"contract": "Initializable",
23+
"label": "_initialized",
24+
"type": "t_bool",
25+
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:39"
26+
},
27+
{
28+
"contract": "Initializable",
29+
"label": "_initializing",
30+
"type": "t_bool",
31+
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:44"
32+
},
33+
{
34+
"contract": "ContextUpgradeable",
35+
"label": "__gap",
36+
"type": "t_array(t_uint256)50_storage",
37+
"src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
38+
},
39+
{
40+
"contract": "OwnableUpgradeable",
41+
"label": "_owner",
42+
"type": "t_address",
43+
"src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
44+
},
45+
{
46+
"contract": "OwnableUpgradeable",
47+
"label": "__gap",
48+
"type": "t_array(t_uint256)49_storage",
49+
"src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:87"
50+
},
51+
{
52+
"contract": "ERC1967UpgradeUpgradeable",
53+
"label": "__gap",
54+
"type": "t_array(t_uint256)50_storage",
55+
"src": "../@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211"
56+
},
57+
{
58+
"contract": "UUPSUpgradeable",
59+
"label": "__gap",
60+
"type": "t_array(t_uint256)50_storage",
61+
"src": "../@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107"
62+
},
63+
{
64+
"contract": "PythState",
65+
"label": "_state",
66+
"type": "t_struct(State)5849_storage",
67+
"src": "../project:/contracts/pyth/PythState.sol:45"
68+
}
69+
],
70+
"types": {
71+
"t_struct(State)5849_storage": {
72+
"label": "struct PythStorage.State",
73+
"members": [
74+
{
75+
"label": "wormhole",
76+
"type": "t_address"
77+
},
78+
{
79+
"label": "_deprecatedPyth2WormholeChainId",
80+
"type": "t_uint16"
81+
},
82+
{
83+
"label": "_deprecatedPyth2WormholeEmitter",
84+
"type": "t_bytes32"
85+
},
86+
{
87+
"label": "_deprecatedLatestPriceInfoV1",
88+
"type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)"
89+
},
90+
{
91+
"label": "validDataSources",
92+
"type": "t_array(t_struct(DataSource)5703_storage)dyn_storage"
93+
},
94+
{
95+
"label": "isValidDataSource",
96+
"type": "t_mapping(t_bytes32,t_bool)"
97+
},
98+
{
99+
"label": "singleUpdateFeeInWei",
100+
"type": "t_uint256"
101+
},
102+
{
103+
"label": "validTimePeriodSeconds",
104+
"type": "t_uint256"
105+
},
106+
{
107+
"label": "governanceDataSource",
108+
"type": "t_struct(DataSource)5703_storage"
109+
},
110+
{
111+
"label": "lastExecutedGovernanceSequence",
112+
"type": "t_uint64"
113+
},
114+
{
115+
"label": "_deprecatedLatestPriceInfoV2",
116+
"type": "t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)"
117+
},
118+
{
119+
"label": "governanceDataSourceIndex",
120+
"type": "t_uint32"
121+
},
122+
{
123+
"label": "latestPriceInfo",
124+
"type": "t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)"
125+
}
126+
]
127+
},
128+
"t_address": {
129+
"label": "address"
130+
},
131+
"t_uint16": {
132+
"label": "uint16"
133+
},
134+
"t_bytes32": {
135+
"label": "bytes32"
136+
},
137+
"t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV1)4485_storage)": {
138+
"label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV1)"
139+
},
140+
"t_struct(DeprecatedPriceInfoV1)4485_storage": {
141+
"label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV1",
142+
"members": [
143+
{
144+
"label": "attestationTime",
145+
"type": "t_uint256"
146+
},
147+
{
148+
"label": "arrivalTime",
149+
"type": "t_uint256"
150+
},
151+
{
152+
"label": "arrivalBlock",
153+
"type": "t_uint256"
154+
},
155+
{
156+
"label": "priceFeed",
157+
"type": "t_struct(DeprecatedPriceFeedV1)4475_storage"
158+
}
159+
]
160+
},
161+
"t_array(t_struct(DataSource)5703_storage)dyn_storage": {
162+
"label": "struct PythInternalStructs.DataSource[]"
163+
},
164+
"t_struct(DataSource)5703_storage": {
165+
"label": "struct PythInternalStructs.DataSource",
166+
"members": [
167+
{
168+
"label": "chainId",
169+
"type": "t_uint16"
170+
},
171+
{
172+
"label": "emitterAddress",
173+
"type": "t_bytes32"
174+
}
175+
]
176+
},
177+
"t_mapping(t_bytes32,t_bool)": {
178+
"label": "mapping(bytes32 => bool)"
179+
},
180+
"t_bool": {
181+
"label": "bool"
182+
},
183+
"t_uint256": {
184+
"label": "uint256"
185+
},
186+
"t_uint64": {
187+
"label": "uint64"
188+
},
189+
"t_mapping(t_bytes32,t_struct(DeprecatedPriceInfoV2)4513_storage)": {
190+
"label": "mapping(bytes32 => struct PythDeprecatedStructs.DeprecatedPriceInfoV2)"
191+
},
192+
"t_struct(DeprecatedPriceInfoV2)4513_storage": {
193+
"label": "struct PythDeprecatedStructs.DeprecatedPriceInfoV2",
194+
"members": [
195+
{
196+
"label": "attestationTime",
197+
"type": "t_uint256"
198+
},
199+
{
200+
"label": "arrivalTime",
201+
"type": "t_uint256"
202+
},
203+
{
204+
"label": "arrivalBlock",
205+
"type": "t_uint256"
206+
},
207+
{
208+
"label": "priceFeed",
209+
"type": "t_struct(DeprecatedPriceFeedV2)4503_storage"
210+
}
211+
]
212+
},
213+
"t_uint32": {
214+
"label": "uint32"
215+
},
216+
"t_mapping(t_bytes32,t_struct(PriceInfo)5698_storage)": {
217+
"label": "mapping(bytes32 => struct PythInternalStructs.PriceInfo)"
218+
},
219+
"t_struct(PriceInfo)5698_storage": {
220+
"label": "struct PythInternalStructs.PriceInfo",
221+
"members": [
222+
{
223+
"label": "publishTime",
224+
"type": "t_uint64"
225+
},
226+
{
227+
"label": "expo",
228+
"type": "t_int32"
229+
},
230+
{
231+
"label": "price",
232+
"type": "t_int64"
233+
},
234+
{
235+
"label": "conf",
236+
"type": "t_uint64"
237+
},
238+
{
239+
"label": "emaPrice",
240+
"type": "t_int64"
241+
},
242+
{
243+
"label": "emaConf",
244+
"type": "t_uint64"
245+
}
246+
]
247+
},
248+
"t_struct(DeprecatedPriceFeedV1)4475_storage": {
249+
"label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV1",
250+
"members": [
251+
{
252+
"label": "id",
253+
"type": "t_bytes32"
254+
},
255+
{
256+
"label": "productId",
257+
"type": "t_bytes32"
258+
},
259+
{
260+
"label": "price",
261+
"type": "t_int64"
262+
},
263+
{
264+
"label": "conf",
265+
"type": "t_uint64"
266+
},
267+
{
268+
"label": "expo",
269+
"type": "t_int32"
270+
},
271+
{
272+
"label": "status",
273+
"type": "t_enum(DeprecatedPriceStatusV1)4445"
274+
},
275+
{
276+
"label": "maxNumPublishers",
277+
"type": "t_uint32"
278+
},
279+
{
280+
"label": "numPublishers",
281+
"type": "t_uint32"
282+
},
283+
{
284+
"label": "emaPrice",
285+
"type": "t_int64"
286+
},
287+
{
288+
"label": "emaConf",
289+
"type": "t_uint64"
290+
},
291+
{
292+
"label": "publishTime",
293+
"type": "t_uint64"
294+
},
295+
{
296+
"label": "prevPrice",
297+
"type": "t_int64"
298+
},
299+
{
300+
"label": "prevConf",
301+
"type": "t_uint64"
302+
},
303+
{
304+
"label": "prevPublishTime",
305+
"type": "t_uint64"
306+
}
307+
]
308+
},
309+
"t_struct(DeprecatedPriceFeedV2)4503_storage": {
310+
"label": "struct PythDeprecatedStructs.DeprecatedPriceFeedV2",
311+
"members": [
312+
{
313+
"label": "id",
314+
"type": "t_bytes32"
315+
},
316+
{
317+
"label": "price",
318+
"type": "t_struct(DeprecatedPriceV2)4494_storage"
319+
},
320+
{
321+
"label": "emaPrice",
322+
"type": "t_struct(DeprecatedPriceV2)4494_storage"
323+
}
324+
]
325+
},
326+
"t_int32": {
327+
"label": "int32"
328+
},
329+
"t_int64": {
330+
"label": "int64"
331+
},
332+
"t_enum(DeprecatedPriceStatusV1)4445": {
333+
"label": "enum PythDeprecatedStructs.DeprecatedPriceStatusV1",
334+
"members": ["UNKNOWN", "TRADING", "HALTED", "AUCTION"]
335+
},
336+
"t_struct(DeprecatedPriceV2)4494_storage": {
337+
"label": "struct PythDeprecatedStructs.DeprecatedPriceV2",
338+
"members": [
339+
{
340+
"label": "price",
341+
"type": "t_int64"
342+
},
343+
{
344+
"label": "conf",
345+
"type": "t_uint64"
346+
},
347+
{
348+
"label": "expo",
349+
"type": "t_int32"
350+
},
351+
{
352+
"label": "publishTime",
353+
"type": "t_uint256"
354+
}
355+
]
356+
},
357+
"t_array(t_uint256)50_storage": {
358+
"label": "uint256[50]"
359+
},
360+
"t_array(t_uint256)49_storage": {
361+
"label": "uint256[49]"
362+
}
363+
}
364+
}
365+
}
366+
}
367+
}

ethereum/Deploying.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ This is the deployment process:
1010
# 2. Export the secret recovery phrase for the deployment account.
1111
export MNEMONIC=$(cat path/to/mnemonic)
1212

13-
# 3. Make sure that third_party/pyth/multisig-wh-message-builder/keys/key.json
13+
14+
# 3. If you are modifying an existing contract, make sure that third_party/pyth/multisig-wh-message-builder/keys/key.json
1415
# has the proper operational key for interacting with the multisig. Please follow
1516
# the corresponding notion doc for more information about the keys.
1617

ethereum/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Run the following command to install required dependencies for the contract:
1010
# xc-governance-sdk-js is a local dependency that should be built
1111
# it is used in deployment (truffle migrations) to generate/sanity check
1212
# the governance VAAs
13-
pushd third_party/pyth/xc-governance-sdk-js && npm ci && popd
13+
pushd ../third_party/pyth/xc-governance-sdk-js && npm ci && popd
1414
npm ci
1515
```
1616

0 commit comments

Comments
 (0)