Chain3 GO 软件库¶
MOAC Go API was built for MOAC chain. It was developed from MOAC RPC API, which can be used to develop Ðapp on MOAC chain. It supports both VNODE and SCS JSON RPC API methods in MOAC network.
Chain3Go Installation¶
MOAC Configuration¶
Install MOAC¶
Download latest MOAC Vnode and SCS Releases from here: https://github.com/MOACChain/moac-core/releases
Run MOAC¶
Run moac vnode on testnet
./moac –testnet
Run moac scs to connect the VNODE locally
./scsserver
Create new accounts and send transactions
mc.coinbase
mc.accounts
personal.newAccount()
passphrase:
repeat passphrase:
miner.start()
--wait a few seconds
miner.stop()
personal.unlockAccount("0x18833df6ba69b4d50acc744e8294d128ed8db1f1")
mc.sendTransaction({from: '0x18833df6ba69b4d50acc744e8294d128ed8db1f1', to: '0x2a022eb956d1962d867dcebd8fed6ae71ee4385a', value: chain3.toSha(12, "moac")})
Chain3Go Execution¶
go run main.go