-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc6151c
commit 2fee577
Showing
2 changed files
with
179 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. | ||
// See the file LICENSE for licensing terms. | ||
|
||
package subnet | ||
|
||
import ( | ||
"avalanche-tooling-sdk-go/avalanche" | ||
"avalanche-tooling-sdk-go/wallet" | ||
"fmt" | ||
"github.com/ava-labs/avalanchego/vms/secp256k1fx" | ||
"github.com/ava-labs/avalanchego/wallet/subnet/primary" | ||
"golang.org/x/net/context" | ||
"testing" | ||
) | ||
|
||
func TestAddValidatorDeploy(_ *testing.T) { | ||
// Initialize a new Avalanche Object which will be used to set shared properties | ||
// like logging, metrics preferences, etc | ||
baseApp := avalanche.New(avalanche.DefaultLeveledLogger) | ||
subnetParams := SubnetParams{ | ||
SubnetEVM: SubnetEVMParams{ | ||
EvmChainID: 1234567, | ||
EvmDefaults: true, | ||
EnableWarp: true, | ||
EnableTeleporter: true, | ||
EnableRelayer: true, | ||
}, | ||
} | ||
newSubnet, _ := New(baseApp, &subnetParams) | ||
ctx := context.Background() | ||
wallet, _ := wallet.New( | ||
ctx, | ||
&primary.WalletConfig{ | ||
URI: "", | ||
AVAXKeychain: nil, | ||
EthKeychain: secp256k1fx.NewKeychain(), | ||
PChainTxsToFetch: nil, | ||
}, | ||
) | ||
// deploy Subnet returns multisig and error | ||
createSubnetTx, _ := newSubnet.CreateSubnetTx(wallet) | ||
fmt.Printf("deploySubnetTx %s", createSubnetTx) | ||
createBlockchainTx, _ := newSubnet.CreateBlockchainTx(wallet) | ||
fmt.Printf("deploySubnetTx %s", createBlockchainTx) | ||
|
||
} |