Last week, we installed neo-boa and fixed up a NEP-5 smart-contract to make it our own! Finally, lets compile and deploy!

“black gaming keyboard” by Aidan Granberry on Unsplash

Step 1: compile the contract code

Open up a command prompt type ubuntu , then sudo -i . Continue on ~

cd neo-boa/

source venv/bin/activate cd ../smart-contract

python3.6 compile.py

**upon completion you will see ico_template.avm

Step 2: Import the contract — Using the same Ubuntu prompt:

cd ../neo-python

source venv/bin/activate np-prompt -p <server IP>

Now that you are in the NEO prompt, open your admin wallet: open wallet testWallet1

import contract ../smart-contract/ico_template.avm "" 0710 05 True False # Fill out the contract details

[Contract Name] > nodis

[Contract Version] > 1

[Contract Author] > nodis

[Contract Email] > nodis

[Contract Description] > nodis

Your contract is now on the block-chain!

Step 3: Deployment time!

Currently, the tokens are all locked up in the contract. Ultimately, we need to call deploy() (a function on the contract) to transfer all the tokens to the admin wallet! Our first task is to find the hash of the contract.

contract search <NODIS>

in our case, the script hash is 0x3ffb8a621f461559a90943986bc813b8fcf6ac0a . now type:

testinvoke <contract hash> deploy []

Input your password when prompted to invoke on the network.