Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testnet4 localnet #3203

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions contrib/localnet/scripts/start-zetaclientd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,9 @@ if [[ -f /root/zetaclient-config-overlay.json ]]; then
mv /tmp/merged_config.json /root/.zetacored/config/zetaclient_config.json
fi

# signet
export CHAIN_18333_SCAN_FROM_BLOCK=latest
# testnet4
export CHAIN_18334_SCAN_FROM_BLOCK=latest

Comment on lines +118 to +122
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should no longer be required with #3224

zetaclientd-supervisor start < /root/password.file
26 changes: 26 additions & 0 deletions contrib/localnet/scripts/zetaclient-config-overlay.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"BTCChainConfigs": {
"18444": {
"RPCUsername": "smoketest",
"RPCPassword": "123",
"RPCHost": "bitcoin:18443",
"RPCParams": "regtest",
"RPCAlertLatency": 60
},
"18333": {
"RPCUsername": "default",
"RPCPassword": "default",
"RPCHost": "172.17.0.1:38332",
"RPCParams": "testnet3",
"RPCAlertLatency": 60
},
"18334": {
"RPCUsername": "default",
"RPCPassword": "default",
"RPCHost": "172.17.0.1:48332",
"RPCParams": "testnet3",
"RPCAlertLatency": 60

}
}
}
20 changes: 20 additions & 0 deletions e2e/txserver/zeta_tx_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,26 @@ func (zts ZetaTxServer) DeployZRC20s(
coin.CoinType_Gas,
100000,
),
fungibletypes.NewMsgDeployFungibleCoinZRC20(
deployerAddr,
"",
chains.BitcoinSignetTestnet.ChainId,
8,
"BTC",
"tBTC",
coin.CoinType_Gas,
100,
),
fungibletypes.NewMsgDeployFungibleCoinZRC20(
deployerAddr,
"",
chains.BitcoinTestnet4.ChainId,
8,
"BTC",
"tBTC",
coin.CoinType_Gas,
100,
),
fungibletypes.NewMsgDeployFungibleCoinZRC20(
deployerAddr,
"",
Expand Down
6 changes: 6 additions & 0 deletions x/observer/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState)
// if no chain params are defined, set localnet chains for test purposes
btcChainParams := types.GetDefaultBtcRegtestChainParams()
btcChainParams.IsSupported = true
btcChainTestnet4Params := types.GetDefaultBtcTestnet4ChainParams()
btcChainTestnet4Params.IsSupported = true
btcChainSignetParams := types.GetDefaultBtcSignetChainParams()
btcChainSignetParams.IsSupported = true
goerliChainParams := types.GetDefaultGoerliLocalnetChainParams()
goerliChainParams.IsSupported = true
zetaPrivnetChainParams := types.GetDefaultZetaPrivnetChainParams()
zetaPrivnetChainParams.IsSupported = true
k.SetChainParamsList(ctx, types.ChainParamsList{
ChainParams: []*types.ChainParams{
btcChainParams,
btcChainTestnet4Params,
btcChainSignetParams,
goerliChainParams,
zetaPrivnetChainParams,
},
Expand Down
38 changes: 38 additions & 0 deletions x/observer/types/chain_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ func GetDefaultChainParams() ChainParamsList {
GetDefaultBscTestnetChainParams(),
GetDefaultMumbaiTestnetChainParams(),
GetDefaultBtcTestnetChainParams(),
GetDefaultBtcTestnet4ChainParams(),
GetDefaultBtcSignetChainParams(),
GetDefaultBtcRegtestChainParams(),
GetDefaultGoerliLocalnetChainParams(),
},
Expand Down Expand Up @@ -279,6 +281,42 @@ func GetDefaultBtcTestnetChainParams() *ChainParams {
IsSupported: false,
}
}
func GetDefaultBtcTestnet4ChainParams() *ChainParams {
return &ChainParams{
ChainId: chains.BitcoinTestnet4.ChainId,
ConfirmationCount: 2,
ZetaTokenContractAddress: constant.EVMZeroAddress,
ConnectorContractAddress: constant.EVMZeroAddress,
Erc20CustodyContractAddress: constant.EVMZeroAddress,
WatchUtxoTicker: 30,
InboundTicker: 120,
OutboundTicker: 12,
GasPriceTicker: 30,
OutboundScheduleInterval: 30,
OutboundScheduleLookahead: 100,
BallotThreshold: DefaultBallotThreshold,
MinObserverDelegation: DefaultMinObserverDelegation,
IsSupported: false,
}
}
func GetDefaultBtcSignetChainParams() *ChainParams {
return &ChainParams{
ChainId: chains.BitcoinSignetTestnet.ChainId,
ConfirmationCount: 2,
ZetaTokenContractAddress: constant.EVMZeroAddress,
ConnectorContractAddress: constant.EVMZeroAddress,
Erc20CustodyContractAddress: constant.EVMZeroAddress,
WatchUtxoTicker: 30,
InboundTicker: 120,
OutboundTicker: 12,
GasPriceTicker: 30,
OutboundScheduleInterval: 30,
OutboundScheduleLookahead: 100,
BallotThreshold: DefaultBallotThreshold,
MinObserverDelegation: DefaultMinObserverDelegation,
IsSupported: false,
}
}
func GetDefaultBtcRegtestChainParams() *ChainParams {
return &ChainParams{
ChainId: chains.BitcoinRegtest.ChainId,
Expand Down
Loading