Venom In Action. Going Global
This section shows you how to deploy your smart contracts to global networks (venom testnet or venom mainnet).
First thing you should deal with - locklift config. Let's setup some global networks in network
section of config
Now we have two new networks in our config - venomTestnet
and venomMainnet
. Our interest now in giver
section of each network.
When you work with local node, you have a pre-deployed giver, which you can use for contract deploying. Of course there is no givers in global network (at least publicly accessible, you can deploy your own giver same as in local node for sure). Locklift allows you to use your venom wallet as giver. In a giver section you should fill address
, phrase
and accountId
fields, according to your wallet data (address of the wallet, seed phrase and account number for accountId). You can use field key
with secret key instead of phrase. Then you should fill keys section the same way (phrase
field, and amount
of accounts you need from given seed phrase)
As you can see we have a giverFactory
field, that initialize a GiverWallet
object. Let's have a look up there.
Pretty simple, isn't it? All you need is to provide an ABI of your contract and change sendTo
function according to provided ABI (of course you should provide a keys in a giver and keys section of config, that allows calling of provided address). When you will use locklift.factory.deployContract
, method sendTo
will be called before deploying.
Now you can just use same deploy scripts, but with another network. For example
Summarizing:
Fill
network
section of your locklift config with data of network you wantTake your wallet address (or another contract you want), seed phrase (or secret key)
Fill a
giver
andkeys
section of your locklift config with data you take previouslyChange
GiverWallet
class according to ABI of your contract (sendTo
function)Call any deploy script with network you need
Last updated