Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit baa74a0

Browse files
refactor: remove deprecated FS contract (#440)
1 parent 8f6f8ca commit baa74a0

Some content is hidden

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

47 files changed

+5
-969
lines changed

.github/workflows/pipeline.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,10 @@ jobs:
7777
}
7878
7979
tradeShieldContractVersion=$(getNewVersionBYContract ${{vars.TS_CONTRACT_ADDRESS}})
80-
financialSnapshotContractVersion=$(getNewVersionBYContract ${{vars.FS_CONTRACT_ADDRESS}})
8180
8281
echo "new tradeShieldContractVersion: $tradeShieldContractVersion"
83-
echo "new financialSnapshotContractVersion: $financialSnapshotContractVersion"
8482
8583
sed -i "s/^version = .*/version = \"$tradeShieldContractVersion\"/" contracts/trade-shield-contract/Cargo.toml
86-
sed -i "s/^version = .*/version = \"$financialSnapshotContractVersion\"/" contracts/financial-snapshot-contract/Cargo.toml
8784
cargo update
8885
8986
docker run --rm -v "$(pwd)":/code \
@@ -151,33 +148,10 @@ jobs:
151148
OPTIONS="--from $NAME --node $NODE --chain-id ${{vars.CHAIN_ID}} --keyring-backend=test --gas auto --gas-adjustment 1.3 --fees 300000uelys -y --account-number $account_number -b async --log_level trace --trace"
152149
153150
##contracts
154-
FS_CONTRACT_ADDRESS=${{vars.FS_CONTRACT_ADDRESS}}
155151
TS_CONTRACT_ADDRESS=${{vars.TS_CONTRACT_ADDRESS}}
156152
157-
printf "FS_CONTRACT_ADDRESS=%s\n" "$FS_CONTRACT_ADDRESS"
158153
printf "TS_CONTRACT_ADDRESS=%s\n" "$TS_CONTRACT_ADDRESS"
159154
160-
# store and init/migrate financial snapshot contract
161-
txhash=$(echo "${{ secrets.PASSPHRASE_MALLORCA }}" | $ELYSD tx wasm store $OPTIONS --sequence $(($sequence + 1)) artifacts/financial_snapshot_contract.wasm | extract_txhash)
162-
echo "fs store txhash: $txhash"
163-
exit_if_tx_is_empty $txhash
164-
wait_for_tx $txhash
165-
codeid=$($ELYSD q tx $txhash --node $NODE | extract_code_id)
166-
echo "fs code id: $codeid"
167-
168-
if [ "$FS_CONTRACT_ADDRESS" != "empty" ]; then
169-
txhash=$( echo "${{ secrets.PASSPHRASE_MALLORCA }}" | $ELYSD tx wasm migrate $OPTIONS --sequence $(($sequence + 2)) $FS_CONTRACT_ADDRESS $codeid '{}' | extract_txhash)
170-
echo "fs migrate txhash: $txhash"
171-
else
172-
txhash=$( echo "${{ secrets.PASSPHRASE_MALLORCA }}" | $ELYSD tx wasm init $OPTIONS --sequence $(($sequence + 2)) --label "fs" --admin $NAME $codeid '{}' | extract_txhash)
173-
echo "fs init txhash: $txhash"
174-
fi
175-
176-
exit_if_tx_is_empty $txhash
177-
wait_for_tx $txhash
178-
export fs_contract_address=$($ELYSD q tx $txhash --node $NODE | extract_contract_address)
179-
echo "fs_contract_address: $fs_contract_address"
180-
181155
# store and init/migrate trade shield contract
182156
txhash=$(echo "${{ secrets.PASSPHRASE_MALLORCA }}" | $ELYSD tx wasm store $OPTIONS --sequence $(($sequence + 3)) artifacts/trade_shield_contract.wasm | extract_txhash)
183157
echo "ts store txhash: $txhash"
@@ -203,5 +177,4 @@ jobs:
203177
printf "\nset those environment variables to use the contracts:\n\n"
204178
printf "export NODE=%s\n" "$NODE"
205179
printf "export NAME=%s\n" "$NAME"
206-
printf "export FS_CONTRACT_ADDRESS=%s\n" "$fs_contract_address"
207180
printf "export TS_CONTRACT_ADDRESS=%s\n" "$ts_contract_address"

Cargo.lock

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,12 @@ This guide provides instructions on how to spin up a new localnet using the Elys
2828

2929
3. **Download the Latest TestNet Snapshot**
3030

31-
Get the latest TestNet snapshot available for the Elys network.
32-
33-
**Main branch**
34-
35-
Use the following command to download the latest TestNet snapshot that uses the changes from the `main` branch:
31+
To get the latest TestNet snapshot available for the Elys network, use the following command to download the latest TestNet snapshot that uses the changes from the `main` branch:
3632

3733
```bash
3834
rm -rf ~/.elys && curl -o - -L https://snapshots.elys.network/elys-snapshot-main.tar.lz4 | lz4 -c -d - | tar -x -C ~/
3935
```
4036

41-
**Devnet branch**
42-
43-
Use the following command to download the latest TestNet snapshot that uses the changes from the `devnet` branch:
44-
45-
```bash
46-
rm -rf ~/.elys && curl -o - -L https://snapshots.elys.network/elys-snapshot-devnet.tar.lz4 | lz4 -c -d - | tar -x -C ~/
47-
```
48-
49-
**Develop branch**
50-
51-
Use the following command to download the latest TestNet snapshot that uses the changes from the `develop` branch:
52-
53-
```bash
54-
rm -rf ~/.elys && curl -o - -L https://snapshots.elys.network/elys-snapshot-develop.tar.lz4 | lz4 -c -d - | tar -x -C ~/
55-
```
56-
5737
4. **Spin Up the Localnet**
5838

5939
Use the command below to start the localnet:
@@ -95,12 +75,10 @@ After running `deploy.sh`, set the provided environment variables:
9575
```bash
9676
export NODE=tcp://localhost:26657
9777
export NAME=validator
98-
export FS_CONTRACT_ADDRESS=<FS_CONTRACT_ADDRESS>
9978
export TS_CONTRACT_ADDRESS=<TS_CONTRACT_ADDRESS>
100-
export AH_CONTRACT_ADDRESS=<AH_CONTRACT_ADDRESS>
10179
```
10280

103-
Replace `<FS_CONTRACT_ADDRESS>`, `<TS_CONTRACT_ADDRESS>`, and `<AH_CONTRACT_ADDRESS>` with the actual contract addresses provided by the deployment script.
81+
Replace `<TS_CONTRACT_ADDRESS>` with the actual contract addresses provided by the deployment script.
10482

10583
## Additional Configuration
10684

contracts/financial-snapshot-contract/.cargo/config

Lines changed: 0 additions & 4 deletions
This file was deleted.

contracts/financial-snapshot-contract/Cargo.toml

Lines changed: 0 additions & 29 deletions
This file was deleted.

contracts/financial-snapshot-contract/README.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

contracts/financial-snapshot-contract/src/action/mod.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.

contracts/financial-snapshot-contract/src/action/query/earn/get_all_validators.rs

Lines changed: 0 additions & 47 deletions
This file was deleted.

contracts/financial-snapshot-contract/src/action/query/earn/get_commitments.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

contracts/financial-snapshot-contract/src/action/query/earn/get_del_validators.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)