Skip to content

Commit

Permalink
run e2e with imported data
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed May 6, 2024
1 parent 7c4cdfa commit 6ff1578
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/zetacored/parse_genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ var Copy = map[string]bool{
evidencetypes.ModuleName: true,
vestingtypes.ModuleName: true,
emissionstypes.ModuleName: true,
authz.ModuleName: true,
}

// Skip represents a set of modules for which, the entire state is skipped and nothing gets imported
Expand All @@ -60,13 +59,14 @@ var Skip = map[string]bool{
banktypes.ModuleName: true,
distributiontypes.ModuleName: true,
group.ModuleName: true,
authz.ModuleName: true,
fungibletypes.ModuleName: true,
}

// Modify represents a set of modules for which, the state is modified before importing. Each Module should have a corresponding Modify function
var Modify = map[string]bool{
crosschaintypes.ModuleName: true,
observertypes.ModuleName: true,
fungibletypes.ModuleName: true,
}

func CmdParseGenesisFile() *cobra.Command {
Expand Down
3 changes: 3 additions & 0 deletions contrib/localnet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ services:
environment:
- HOTKEY_BACKEND=file
- HOTKEY_PASSWORD=password # test purposes only
volumes:
- /Users/tanmay/IdeaProjects/kingpinXD/genesis_export/:/root/genesis_data

zetacore1:
image: zetanode:latest
Expand All @@ -64,6 +66,7 @@ services:
- HOTKEY_BACKEND=file
- HOTKEY_PASSWORD=password # test purposes only


zetaclient0:
image: zetanode:latest
container_name: zetaclient0
Expand Down
2 changes: 1 addition & 1 deletion contrib/localnet/orchestrator/start-zetae2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ZETAE2E_CMD=$1
OPTION=$2

echo "waiting for geth RPC to start..."
sleep 2
sleep 420

### Create the accounts and fund them with Ether on local Ethereum network

Expand Down
2 changes: 1 addition & 1 deletion contrib/localnet/scripts/start-zetaclientd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ num=$(echo $HOSTNAME | tr -dc '0-9')
node="zetacore$num"

echo "Wait for zetacore to exchange genesis file"
sleep 40
sleep 410
operator=$(cat $HOME/.zetacored/os.json | jq '.ObserverAddress' )
operatorAddress=$(echo "$operator" | tr -d '"')
echo "operatorAddress: $operatorAddress"
Expand Down
5 changes: 4 additions & 1 deletion contrib/localnet/scripts/start-zetacored.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ source ~/add-keys.sh
if [ $HOSTNAME != "zetacore0" ]
then
echo "Waiting for zetacore0 to create genesis.json"
sleep 10
sleep 400
echo "genesis.json created"
fi

Expand Down Expand Up @@ -155,9 +155,12 @@ then

# 4. Collect all the gentx files in zetacore0 and create the final genesis.json
zetacored collect-gentxs
zetacored parse-genesis-file /root/genesis_data/exported-genesis.json
zetacored validate-genesis

# 5. Copy the final genesis.json to all the nodes
for NODE in "${NODELIST[@]}"; do
echo "Copying genesis.json to $NODE"
ssh $NODE rm -rf ~/.zetacored/genesis.json
scp ~/.zetacored/config/genesis.json $NODE:~/.zetacored/config/genesis.json
done
Expand Down
1 change: 1 addition & 0 deletions x/fungible/keeper/deposits.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func (k Keeper) ZRC20DepositAndCallContract(

// check foreign coins cap if it has a cap
if !foreignCoin.LiquidityCap.IsNil() && !foreignCoin.LiquidityCap.IsZero() {

liquidityCap := foreignCoin.LiquidityCap.BigInt()
totalSupply, err := k.TotalSupplyZRC4(ctx, ZRC20Contract)
if err != nil {
Expand Down

0 comments on commit 6ff1578

Please sign in to comment.