In the previous chapters, we used a local blockchain emulator where a very simple wallet was already deployed, which can only send coins to a certain address in order to deploy a contract via an external message.
For the test/main network, you need to have an already deployed wallet (giver). We will use the EverWallet as the giver.
A wallet can be created programmatically using eversdk or inpage-provider.
But we will use a browser extension, VenomWallet, for this purpose. We will need it anyway for writing the frontend or for interacting with contracts through a web interface.
Follow this guide to create a new account in venom wallet. At this stage, you should not have any problems. Write down the seed phrase and by default, an EverWallet contract will be created for you using the pair of keys obtained from the seed phrase. Never share your seed phrase or private key with anyone, and do not commit it in the git. Keep it in a safe place, because if you lose access to your seed phrase or private key, you will also lose access to your wallet and all the assets it contains.
You need to obtain test tokens to your wallet address through the faucet.
After receiving the coins, you need to make a transfer to deploy the wallet, for example, send 1 VENOM to yourself.
Now we have a test wallet that can be used as both a wallet and a giver. Let's see how to set up the test network in our examples:
// With locklift all is simple. It already has all sugar for different networks.
// All is you need is just to add the settings to locklift.config.ts
// Go to the target network (test or main) and set giver setting:
giver: {
// Put your wallet address there
// Locklift will automatically determine the type of wallet contract
address: "0:2746d46337aa25d790c97f1aefb01a5de48cc1315b41a4f32753146a1e1aeb7d",
// Your seed phrase here, better to get it from the process.env
// to avoid accidentally leak seed phrases into git
// !!! Never commit it in your repos !!!
phrase: "action inject penalty envelope rabbit element slim tornado dinner pizza off blood"
}
// Also a bit below, we set a pair of keys that will be used for the default signer.
// You can use the same wallet, then we don't need to deploy the wallet by launching
// npx locklift run --script scripts/0-deploy-owner-everwallet.ts --network test
// in our locklift example.
keys: {
// !!! Never commit it in your repos !!!
phrase: "action inject penalty envelope rabbit element slim tornado dinner pizza off blood",
amount: 1
},
// Thats all, now you can use
// npx locklift run --script scripts/your_script.ts --network venom_testnet
// or
// npx locklift test -n venom_testnet
I also remind you of the standard hygiene rules when working with testnet/mainnet: