Skip to content

Commit 80b92fe

Browse files
committed
(Fix #25) Support for Sui 0.31 release
1 parent dc98199 commit 80b92fe

File tree

12 files changed

+258
-6
lines changed

12 files changed

+258
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020
### Removed
2121

2222

23+
## [0.1.2] 2023-04-10
24+
25+
### Fixed
26+
27+
- Scripts: (#25) Fix for Sui 0.31 support (change to config.yaml)
28+
2329
## [0.1.1] 2023-04-01
2430

2531
### Fixed

scripts/common/__globals.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
USER_CWD=$(pwd -P)
99

10-
SUI_BASE_VERSION="0.1.1"
10+
SUI_BASE_VERSION="0.1.2"
1111

1212
# Sui-base does not work with version below these.
1313
MIN_SUI_VERSION="sui 0.27.0"
@@ -524,7 +524,7 @@ exit_if_sui_binary_not_ok() {
524524
# Sometimes the binary are ok, but not the config (may happen when the
525525
# localnet config directory is safely wipe out on set-sui-repo transitions).
526526
if [ "$CFG_network_type" = "local" ]; then
527-
if [ ! -f "$NETWORK_CONFIG" ] || [ ! -f "$CLIENT_CONFIG" ]; then
527+
if [ ! -f "$CLIENT_CONFIG" ]; then
528528
echo
529529
echo "The localnet need to be regenerated."
530530
echo

scripts/common/__publish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ publish_local() {
3030

3131
# Build the Move package for publication.
3232
#echo Now publishing on network
33-
CMD="$SUI_EXEC client publish --gas-budget 30000 --install-dir \"$INSTALL_DIR\" \"$MOVE_TOML_DIR\" $_PASSTHRU_OPTIONS --json 2>&1 1>$INSTALL_DIR/publish-output.json"
33+
CMD="$SUI_EXEC client publish --gas-budget 400000000 --install-dir \"$INSTALL_DIR\" \"$MOVE_TOML_DIR\" $_PASSTHRU_OPTIONS --json 2>&1 1>$INSTALL_DIR/publish-output.json"
3434

3535
echo $CMD
3636
echo "sui-base: Publishing..."

scripts/common/__workdir-init-local.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,14 @@ workdir_init_local() {
140140

141141
# Find which static genesis_data version should be used.
142142
# Only two so far >=0.28 and everything else below.
143-
if version_greater_equal "$("$SUI_BIN_DIR/sui" -V)" "sui 0.28"; then
144-
_STATIC_SOURCE_DIR="$DEFAULT_GENESIS_DATA_DIR/0.28"
143+
if version_greater_equal "$("$SUI_BIN_DIR/sui" -V)" "sui 0.31"; then
144+
_STATIC_SOURCE_DIR="$DEFAULT_GENESIS_DATA_DIR/0.31"
145145
else
146-
_STATIC_SOURCE_DIR="$DEFAULT_GENESIS_DATA_DIR/0.27"
146+
if version_greater_equal "$("$SUI_BIN_DIR/sui" -V)" "sui 0.28"; then
147+
_STATIC_SOURCE_DIR="$DEFAULT_GENESIS_DATA_DIR/0.28"
148+
else
149+
_STATIC_SOURCE_DIR="$DEFAULT_GENESIS_DATA_DIR/0.27"
150+
fi
147151
fi
148152
yes | cp -rf "$_STATIC_SOURCE_DIR/sui.keystore" "$_GENDATA_DIR"
149153
yes | cp -rf "$_STATIC_SOURCE_DIR/client.yaml" "$_GENDATA_DIR"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
keystore:
3+
File: <PUT_CONFIG_DEFAULT_PATH_HERE>/sui.keystore
4+
envs:
5+
- alias: localnet
6+
rpc: "http://0.0.0.0:9000"
7+
ws: ~
8+
active_env: localnet
9+
active_address: "0xf7ae71f84fabc58662bd4209a8893f462c60f247095bb35b19ff659ad0081462"
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
validator_config_info: ~
3+
parameters:
4+
chain_start_timestamp_ms: 1681171266532
5+
protocol_version: 4
6+
allow_insertion_of_extra_objects: true
7+
epoch_duration_ms: 86400000
8+
stake_subsidy_start_epoch: 0
9+
stake_subsidy_initial_distribution_amount: 1000000000000000
10+
stake_subsidy_period_length: 30
11+
stake_subsidy_decrease_rate: 10000
12+
committee_size: 0
13+
grpc_load_shed: ~
14+
grpc_concurrency_limit: 20000000000
15+
accounts:
16+
- address: 0fc530455ee4132b761ed82dab732990cb7af73e69cd6e719a2a5badeaed105b
17+
gas_amounts:
18+
- 30000000000000000
19+
- 30000000000000000
20+
- 30000000000000000
21+
- 30000000000000000
22+
- 30000000000000000
23+
- address: 1cf34ae2e006fbfa9cee6ae4703b1a6c4ef627ab22e92e226bc6975521d0d705
24+
gas_amounts:
25+
- 30000000000000000
26+
- 30000000000000000
27+
- 30000000000000000
28+
- 30000000000000000
29+
- 30000000000000000
30+
- address: 265254cffb43b73101579fecd21884d34336b3f23f61428a4e681bd96857ad66
31+
gas_amounts:
32+
- 30000000000000000
33+
- 30000000000000000
34+
- 30000000000000000
35+
- 30000000000000000
36+
- 30000000000000000
37+
- address: 3924d75ba4380a7f2ef0f1e2158eb72a1f7b2571af0cf04e994e31a38e95ef9e
38+
gas_amounts:
39+
- 30000000000000000
40+
- 30000000000000000
41+
- 30000000000000000
42+
- 30000000000000000
43+
- 30000000000000000
44+
- address: 4bbf7f41e39cc238f76758f5c1d139d4af363eba16fe558188a867fec4fe3258
45+
gas_amounts:
46+
- 30000000000000000
47+
- 30000000000000000
48+
- 30000000000000000
49+
- 30000000000000000
50+
- 30000000000000000
51+
- address: 4deb09f93afb1d6d1c0847a406d1224de7cd92f6041a5c6ba24c1db4b3e64c1f
52+
gas_amounts:
53+
- 30000000000000000
54+
- 30000000000000000
55+
- 30000000000000000
56+
- 30000000000000000
57+
- 30000000000000000
58+
- address: 5b8fd223087b3364d410c49f01dc4ba2b4efaae2381b36365d4bb5a498eb872c
59+
gas_amounts:
60+
- 30000000000000000
61+
- 30000000000000000
62+
- 30000000000000000
63+
- 30000000000000000
64+
- 30000000000000000
65+
- address: 65c577fa84aaee9e8101d0b3b5df2591d81627dfcc3ccef7dc6a2e6af67de336
66+
gas_amounts:
67+
- 30000000000000000
68+
- 30000000000000000
69+
- 30000000000000000
70+
- 30000000000000000
71+
- 30000000000000000
72+
- address: 6af1d467b1903e2f79a8c7bc11d51eeb8c827497b85bf8a9d27f0afe2397a189
73+
gas_amounts:
74+
- 30000000000000000
75+
- 30000000000000000
76+
- 30000000000000000
77+
- 30000000000000000
78+
- 30000000000000000
79+
- address: 7603f74da67d3e1d86c3d1f8baa8cdaa836bb779e5d4b96b45ee72e9f25dc0f7
80+
gas_amounts:
81+
- 30000000000000000
82+
- 30000000000000000
83+
- 30000000000000000
84+
- 30000000000000000
85+
- 30000000000000000
86+
- address: 7d26eb76b7f1bc860ebddc267c3ad2170ede002d70df903e0783131ae4a37a0e
87+
gas_amounts:
88+
- 30000000000000000
89+
- 30000000000000000
90+
- 30000000000000000
91+
- 30000000000000000
92+
- 30000000000000000
93+
- address: 8c66fda13388668dcb7bbe402c56e5819fa429f973070f094775711a4bb63b34
94+
gas_amounts:
95+
- 30000000000000000
96+
- 30000000000000000
97+
- 30000000000000000
98+
- 30000000000000000
99+
- 30000000000000000
100+
- address: bd0fd1261a56b8eb7aa00c9c61587bace432ad3adad35d6a230a39be0605a35a
101+
gas_amounts:
102+
- 30000000000000000
103+
- 30000000000000000
104+
- 30000000000000000
105+
- 30000000000000000
106+
- 30000000000000000
107+
- address: c7294a5cc946db818c4058c83c933ad6c28e73711bee21c7fa85553c90cb7244
108+
gas_amounts:
109+
- 30000000000000000
110+
- 30000000000000000
111+
- 30000000000000000
112+
- 30000000000000000
113+
- 30000000000000000
114+
- address: ef6e9dd8f30dea802e0474a7996e5c772c581cc1adee45afb660f15a081d1c49
115+
gas_amounts:
116+
- 30000000000000000
117+
- 30000000000000000
118+
- 30000000000000000
119+
- 30000000000000000
120+
- 30000000000000000
121+
- address: f7ae71f84fabc58662bd4209a8893f462c60f247095bb35b19ff659ad0081462
122+
gas_amounts:
123+
- 30000000000000000
124+
- 30000000000000000
125+
- 30000000000000000
126+
- 30000000000000000
127+
- 30000000000000000
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
keystore:
3+
File: <PUT_FAUCET_PATH_HERE>/sui.keystore
4+
envs:
5+
- alias: localnet
6+
rpc: "http://0.0.0.0:9000"
7+
ws: ~
8+
active_env: localnet
9+
active_address: "0x265254cffb43b73101579fecd21884d34336b3f23f61428a4e681bd96857ad66"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[
2+
"APif1H70TprlHD/SCKrPLtvqYiPCStXWTlhoVECMvaYt"
3+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0x265254cffb43b73101579fecd21884d34336b3f23f61428a4e681bd96857ad66
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
Created new keypair for address with scheme ED25519: [0x0fc530455ee4132b761ed82dab732990cb7af73e69cd6e719a2a5badeaed105b]
2+
Secret Recovery Phrase : [indicate typical scout glove shiver aunt copper liquid utility artist between ride virus tilt embrace bitter infant release blur person flash despair sheriff company]
3+
============================
4+
5+
6+
Created new keypair for address with scheme Secp256k1: [0x7d26eb76b7f1bc860ebddc267c3ad2170ede002d70df903e0783131ae4a37a0e]
7+
Secret Recovery Phrase : [pool cable baby juice symbol hotel solution pistol skull river long hidden artefact obey build ankle brisk cushion screen vapor advice absorb gauge interest]
8+
============================
9+
10+
11+
Created new keypair for address with scheme Secp256r1: [0x4bbf7f41e39cc238f76758f5c1d139d4af363eba16fe558188a867fec4fe3258]
12+
Secret Recovery Phrase : [science history damage unknown hurt lucky scheme raw much actor over bright patient matter load observe discover hungry dry fragile figure park punch shell]
13+
============================
14+
15+
16+
Created new keypair for address with scheme ED25519: [0x3924d75ba4380a7f2ef0f1e2158eb72a1f7b2571af0cf04e994e31a38e95ef9e]
17+
Secret Recovery Phrase : [history girl typical million room year news hybrid curious level judge vote mushroom tool clap click perfect lens glass axis shop silk shock thought]
18+
============================
19+
20+
21+
Created new keypair for address with scheme Secp256k1: [0xbd0fd1261a56b8eb7aa00c9c61587bace432ad3adad35d6a230a39be0605a35a]
22+
Secret Recovery Phrase : [goddess vanish duty venue ready scheme possible field panic genius end axis illegal world crouch below gate advice cute toy fault taxi remember degree]
23+
============================
24+
25+
26+
Created new keypair for address with scheme Secp256r1: [0xef6e9dd8f30dea802e0474a7996e5c772c581cc1adee45afb660f15a081d1c49]
27+
Secret Recovery Phrase : [split circle damage lesson wire sphere affair hood pumpkin secret sugar pole still problem valley hospital seminar enact embark output panda team concert alter]
28+
============================
29+
30+
31+
Created new keypair for address with scheme ED25519: [0x8c66fda13388668dcb7bbe402c56e5819fa429f973070f094775711a4bb63b34]
32+
Secret Recovery Phrase : [fabric tackle resemble buddy fence height only agent fee draft series earn color suggest attract medal dumb dose road history near seek mask absent]
33+
============================
34+
35+
36+
Created new keypair for address with scheme Secp256k1: [0x5b8fd223087b3364d410c49f01dc4ba2b4efaae2381b36365d4bb5a498eb872c]
37+
Secret Recovery Phrase : [sphere quiz penalty excess illegal record edit sort digital climb laundry hope hammer night answer water grain detect busy ordinary panda love rapid silly]
38+
============================
39+
40+
41+
Created new keypair for address with scheme Secp256r1: [0xc7294a5cc946db818c4058c83c933ad6c28e73711bee21c7fa85553c90cb7244]
42+
Secret Recovery Phrase : [soft dwarf afraid olympic much answer enemy couch shallow produce language balance oppose together artist novel critic cluster orphan prosper execute plastic clinic faint]
43+
============================
44+
45+
46+
Created new keypair for address with scheme ED25519: [0x1cf34ae2e006fbfa9cee6ae4703b1a6c4ef627ab22e92e226bc6975521d0d705]
47+
Secret Recovery Phrase : [ahead blush chat nuclear hungry decade once soda weird course state couch nice dismiss tonight order oven easy pen famous creek panther symptom prize]
48+
============================
49+
50+
51+
Created new keypair for address with scheme Secp256k1: [0x6af1d467b1903e2f79a8c7bc11d51eeb8c827497b85bf8a9d27f0afe2397a189]
52+
Secret Recovery Phrase : [body way else material wall fit wild session demise mixed dust popular flavor summer bubble lottery artist account twice spot wait grow avocado boring]
53+
============================
54+
55+
56+
Created new keypair for address with scheme Secp256r1: [0x65c577fa84aaee9e8101d0b3b5df2591d81627dfcc3ccef7dc6a2e6af67de336]
57+
Secret Recovery Phrase : [express middle scare job approve seven magic monitor slogan note diagram bonus notable liquid click apart scare merge jealous run ordinary black noble into]
58+
============================
59+
60+
61+
Created new keypair for address with scheme ED25519: [0xf7ae71f84fabc58662bd4209a8893f462c60f247095bb35b19ff659ad0081462]
62+
Secret Recovery Phrase : [rain insane exist giant desk jungle slice holiday amount physical long lens nose pave tool theory library piece absurd dilemma wrist tragic boring dash]
63+
============================
64+
65+
66+
Created new keypair for address with scheme Secp256k1: [0x7603f74da67d3e1d86c3d1f8baa8cdaa836bb779e5d4b96b45ee72e9f25dc0f7]
67+
Secret Recovery Phrase : [dash maid valve subject attitude day upon interest garbage absurd original feel add carpet casino feel unaware train reduce street rigid antique horn gospel]
68+
============================
69+
70+
71+
Created new keypair for address with scheme Secp256r1: [0x4deb09f93afb1d6d1c0847a406d1224de7cd92f6041a5c6ba24c1db4b3e64c1f]
72+
Secret Recovery Phrase : [dirt antenna explain sun slab remain token mushroom explain wild course melt brisk man crime spell bitter entire hollow document delay follow range taste]
73+
============================
74+
75+

0 commit comments

Comments
 (0)