How to request NEO Testnet Token

With python

Johnny Hsieh
Coinmonks
Published in
2 min readNov 1, 2018

--

OSX: Mac

Language: Python

Library: neo-python

Apply Testnet token:

You need to fill up the request form:

https://neo.org/Testnet/Create

Set up environment :

LevelDB

OSX

brew install leveldb

neo-python

pip3 install neo-python

Bootstrapping the Blockchain

If you use neo-python for the first time, you need to synchronize the blockchain, which may take a long time. Included in this project is the script np-bootstrap to automatically download a chain directory for you.

Download all the chain data at once:

Bootstrap the testnet data

$np-bootstrap

Bootstrap the testnet notifications database

$np-bootstrap -n

Then start NEO testnet:

$np-prompt -n

And wait few minutes( it might take a while ) util the testnet and you wallet are fully synced or you might occur in following warring:

[W 181101 12:31:59 Wallet:1071] Wait for your wallet to be synced before doing transactions. To check enter 'wallet' and look at 'percent_synced', it should be 100. Also the blockchain should be up to the latest blocks (see Progress). Issuing 'wallet rebuild' restarts the syncing process.
insufficient funds

Claim the NEO Testnet Token

After the testnet and wallet have fully synced, we can now adding a multi signature address

neo> wallet
Wallet {
...
"public_keys": [
{
"Address": "ARn9bHx2xtergBBz1Qt4Nrft136A7UcmGZ",
"Public Key": "02dcb700b9bc49b9b2d39e5bfda4de8f5e9e50002f6c698399b0f33cadad07a60c" <--- take this
}
],
...
}

Using import mustisig_addr to get the ownership of the contract that NEO dev team give us.

neo> import multisig_addr 02dcb700b9bc49b9b2d39e5bfda4de8f5e9e50002f6c698399b0f33cadad07a60c 1 02dcb700b9bc49b9b2d39e5bfda4de8f5e9e50002f6c698399b0f33cadad07a60c

e12 02380be6608d6fc594d2bcc4cca5f1b0af20cb55c6b4632477ee7176b6826c1cb4

[I 181101 14:20:18 UserWallet:193] contract does not exist yet

Added multi-sig contract address AWft67kcuRuLj7qTp1EnCTTWRaob9Su5ga to wallet

Now you can transfer your NEO asset from the contract

send {assetId or name} {to_addr} {amount} --from-addr={from_addr}

You can check your balance by this site.

https://neoscan-testnet.io/address/

Now we can finally start to deploy contract on NEO Testnet.

Get Best Software Deals Directly In Your Inbox

--

--

Johnny Hsieh
Coinmonks

Co-founder of Portal Network,Founder of PXTag , Deep learning engineer,Blockchain developer ,Swift & Python engineer, Blockchain & Smart Contract developer.