Skip to content

Commit

Permalink
(Fix #25) Support for Sui 0.31 release
Browse files Browse the repository at this point in the history
  • Loading branch information
mario4tier committed Apr 11, 2023
1 parent dc98199 commit 80b92fe
Show file tree
Hide file tree
Showing 12 changed files with 258 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed


## [0.1.2] 2023-04-10

### Fixed

- Scripts: (#25) Fix for Sui 0.31 support (change to config.yaml)

## [0.1.1] 2023-04-01

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions scripts/common/__globals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

USER_CWD=$(pwd -P)

SUI_BASE_VERSION="0.1.1"
SUI_BASE_VERSION="0.1.2"

# Sui-base does not work with version below these.
MIN_SUI_VERSION="sui 0.27.0"
Expand Down Expand Up @@ -524,7 +524,7 @@ exit_if_sui_binary_not_ok() {
# Sometimes the binary are ok, but not the config (may happen when the
# localnet config directory is safely wipe out on set-sui-repo transitions).
if [ "$CFG_network_type" = "local" ]; then
if [ ! -f "$NETWORK_CONFIG" ] || [ ! -f "$CLIENT_CONFIG" ]; then
if [ ! -f "$CLIENT_CONFIG" ]; then
echo
echo "The localnet need to be regenerated."
echo
Expand Down
2 changes: 1 addition & 1 deletion scripts/common/__publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ publish_local() {

# Build the Move package for publication.
#echo Now publishing on network
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"
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"

echo $CMD
echo "sui-base: Publishing..."
Expand Down
10 changes: 7 additions & 3 deletions scripts/common/__workdir-init-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,14 @@ workdir_init_local() {

# Find which static genesis_data version should be used.
# Only two so far >=0.28 and everything else below.
if version_greater_equal "$("$SUI_BIN_DIR/sui" -V)" "sui 0.28"; then
_STATIC_SOURCE_DIR="$DEFAULT_GENESIS_DATA_DIR/0.28"
if version_greater_equal "$("$SUI_BIN_DIR/sui" -V)" "sui 0.31"; then
_STATIC_SOURCE_DIR="$DEFAULT_GENESIS_DATA_DIR/0.31"
else
_STATIC_SOURCE_DIR="$DEFAULT_GENESIS_DATA_DIR/0.27"
if version_greater_equal "$("$SUI_BIN_DIR/sui" -V)" "sui 0.28"; then
_STATIC_SOURCE_DIR="$DEFAULT_GENESIS_DATA_DIR/0.28"
else
_STATIC_SOURCE_DIR="$DEFAULT_GENESIS_DATA_DIR/0.27"
fi
fi
yes | cp -rf "$_STATIC_SOURCE_DIR/sui.keystore" "$_GENDATA_DIR"
yes | cp -rf "$_STATIC_SOURCE_DIR/client.yaml" "$_GENDATA_DIR"
Expand Down
9 changes: 9 additions & 0 deletions scripts/genesis_data/0.31/client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
keystore:
File: <PUT_CONFIG_DEFAULT_PATH_HERE>/sui.keystore
envs:
- alias: localnet
rpc: "http://0.0.0.0:9000"
ws: ~
active_env: localnet
active_address: "0xf7ae71f84fabc58662bd4209a8893f462c60f247095bb35b19ff659ad0081462"
127 changes: 127 additions & 0 deletions scripts/genesis_data/0.31/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
validator_config_info: ~
parameters:
chain_start_timestamp_ms: 1681171266532
protocol_version: 4
allow_insertion_of_extra_objects: true
epoch_duration_ms: 86400000
stake_subsidy_start_epoch: 0
stake_subsidy_initial_distribution_amount: 1000000000000000
stake_subsidy_period_length: 30
stake_subsidy_decrease_rate: 10000
committee_size: 0
grpc_load_shed: ~
grpc_concurrency_limit: 20000000000
accounts:
- address: 0fc530455ee4132b761ed82dab732990cb7af73e69cd6e719a2a5badeaed105b
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: 1cf34ae2e006fbfa9cee6ae4703b1a6c4ef627ab22e92e226bc6975521d0d705
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: 265254cffb43b73101579fecd21884d34336b3f23f61428a4e681bd96857ad66
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: 3924d75ba4380a7f2ef0f1e2158eb72a1f7b2571af0cf04e994e31a38e95ef9e
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: 4bbf7f41e39cc238f76758f5c1d139d4af363eba16fe558188a867fec4fe3258
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: 4deb09f93afb1d6d1c0847a406d1224de7cd92f6041a5c6ba24c1db4b3e64c1f
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: 5b8fd223087b3364d410c49f01dc4ba2b4efaae2381b36365d4bb5a498eb872c
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: 65c577fa84aaee9e8101d0b3b5df2591d81627dfcc3ccef7dc6a2e6af67de336
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: 6af1d467b1903e2f79a8c7bc11d51eeb8c827497b85bf8a9d27f0afe2397a189
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: 7603f74da67d3e1d86c3d1f8baa8cdaa836bb779e5d4b96b45ee72e9f25dc0f7
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: 7d26eb76b7f1bc860ebddc267c3ad2170ede002d70df903e0783131ae4a37a0e
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: 8c66fda13388668dcb7bbe402c56e5819fa429f973070f094775711a4bb63b34
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: bd0fd1261a56b8eb7aa00c9c61587bace432ad3adad35d6a230a39be0605a35a
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: c7294a5cc946db818c4058c83c933ad6c28e73711bee21c7fa85553c90cb7244
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: ef6e9dd8f30dea802e0474a7996e5c772c581cc1adee45afb660f15a081d1c49
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: f7ae71f84fabc58662bd4209a8893f462c60f247095bb35b19ff659ad0081462
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
9 changes: 9 additions & 0 deletions scripts/genesis_data/0.31/faucet_client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
keystore:
File: <PUT_FAUCET_PATH_HERE>/sui.keystore
envs:
- alias: localnet
rpc: "http://0.0.0.0:9000"
ws: ~
active_env: localnet
active_address: "0x265254cffb43b73101579fecd21884d34336b3f23f61428a4e681bd96857ad66"
3 changes: 3 additions & 0 deletions scripts/genesis_data/0.31/faucet_sui.keystore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"APif1H70TprlHD/SCKrPLtvqYiPCStXWTlhoVECMvaYt"
]
1 change: 1 addition & 0 deletions scripts/genesis_data/0.31/faucet_wallet_address.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0x265254cffb43b73101579fecd21884d34336b3f23f61428a4e681bd96857ad66
75 changes: 75 additions & 0 deletions scripts/genesis_data/0.31/recovery.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Created new keypair for address with scheme ED25519: [0x0fc530455ee4132b761ed82dab732990cb7af73e69cd6e719a2a5badeaed105b]
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]
============================


Created new keypair for address with scheme Secp256k1: [0x7d26eb76b7f1bc860ebddc267c3ad2170ede002d70df903e0783131ae4a37a0e]
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]
============================


Created new keypair for address with scheme Secp256r1: [0x4bbf7f41e39cc238f76758f5c1d139d4af363eba16fe558188a867fec4fe3258]
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]
============================


Created new keypair for address with scheme ED25519: [0x3924d75ba4380a7f2ef0f1e2158eb72a1f7b2571af0cf04e994e31a38e95ef9e]
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]
============================


Created new keypair for address with scheme Secp256k1: [0xbd0fd1261a56b8eb7aa00c9c61587bace432ad3adad35d6a230a39be0605a35a]
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]
============================


Created new keypair for address with scheme Secp256r1: [0xef6e9dd8f30dea802e0474a7996e5c772c581cc1adee45afb660f15a081d1c49]
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]
============================


Created new keypair for address with scheme ED25519: [0x8c66fda13388668dcb7bbe402c56e5819fa429f973070f094775711a4bb63b34]
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]
============================


Created new keypair for address with scheme Secp256k1: [0x5b8fd223087b3364d410c49f01dc4ba2b4efaae2381b36365d4bb5a498eb872c]
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]
============================


Created new keypair for address with scheme Secp256r1: [0xc7294a5cc946db818c4058c83c933ad6c28e73711bee21c7fa85553c90cb7244]
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]
============================


Created new keypair for address with scheme ED25519: [0x1cf34ae2e006fbfa9cee6ae4703b1a6c4ef627ab22e92e226bc6975521d0d705]
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]
============================


Created new keypair for address with scheme Secp256k1: [0x6af1d467b1903e2f79a8c7bc11d51eeb8c827497b85bf8a9d27f0afe2397a189]
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]
============================


Created new keypair for address with scheme Secp256r1: [0x65c577fa84aaee9e8101d0b3b5df2591d81627dfcc3ccef7dc6a2e6af67de336]
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]
============================


Created new keypair for address with scheme ED25519: [0xf7ae71f84fabc58662bd4209a8893f462c60f247095bb35b19ff659ad0081462]
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]
============================


Created new keypair for address with scheme Secp256k1: [0x7603f74da67d3e1d86c3d1f8baa8cdaa836bb779e5d4b96b45ee72e9f25dc0f7]
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]
============================


Created new keypair for address with scheme Secp256r1: [0x4deb09f93afb1d6d1c0847a406d1224de7cd92f6041a5c6ba24c1db4b3e64c1f]
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]
============================


17 changes: 17 additions & 0 deletions scripts/genesis_data/0.31/sui.keystore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
"AOToawZbfMNATU6KPldYuoGQpp82BE0w5BknPCTBjgXT",
"AAYp6dagpe5U055xhXEFeAfvpg5CL37tJLbWd2TwsgIF",
"APDKm1PElnKl8ho8uNhpM552kdJznTT+bg1UZCjANF+V",
"AmTXXoiEVTdpy3pBWVAaAWx5baNanBN21NshmAiSPDWW",
"AgkjIWBLs53Y/YdHLeQbn3k+Wr9yFcKXK2ivSrpb4EEJ",
"AZ+icizjP7v56ictP43BnEIbnkEnET35/RukP2wiCrGo",
"AlIJDJy/RTUHmy/yg/SZ4K3RXe3R1p4jlyal9L74YVMO",
"Aevne5DjMbRiWxy4rE/3dUJHDcFc2GYK4bmla+F/PPcG",
"AfHFBPbdCz951uT/QA5lxgjwjiAzGlYllurdrqB5csZd",
"AaKgZDp+Hri7h4gCHTtZQbCkpd17JhuLXcQ06TvR+PxB",
"AEOYrQ5/6U6DGE+/ynsKXNOK9u7gNc+G+gYcslS2+94r",
"ATpljpZ9bf8EO9owTYj43/EELK+4NoF1NI4ejc+qY+69",
"AkD/PsFC+ty3UDH/HoLATWEQErKXnh1mGq5/joUGch9p",
"Aj+iLgwff25QAiIbGScNcSOW95lGS2OENobxibONnlAH",
"AMq8Kc5qhwstOsvX81rv9+v84uqgL1Aj7VS84jDDjOfo"
]
1 change: 1 addition & 0 deletions scripts/genesis_data/0.31/wallet_address.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0xf7ae71f84fabc58662bd4209a8893f462c60f247095bb35b19ff659ad0081462

0 comments on commit 80b92fe

Please sign in to comment.