Deploying a Contract¶
Once you are ready to deploy your contract to a public test net or the main net, you have several options:
Take the bytecode generated by the vyper compiler and manually deploy it through mist or geth:
vyper yourFileName.vy
# returns bytecode
Take the byte code and ABI and deploy it with your current browser on myetherwallet’s contract menu:
vyper -f abi yourFileName.vy
# returns ABI
Use Titanoboa:
import boa
boa.set_network_env(<RPC URL>)
from eth_account import Account
# in a real codebase, always load private keys safely from an encrypted store!
boa.env.add_account(Account(<a private key>))
deployer = boa.load_partial("yourFileName.vy")
deployer.deploy()
Use the development environment provided at https://try.vyperlang.org to compile and deploy your contract on your net of choice. try.vyperlang.org comes “batteries-included”, with Titanoboa pre-installed, and browser signer integration as well.