MCPcopy Create free account
hub / github.com/CPChain/chain / DeployRNode

Function DeployRNode

tools/smartcontract/deploy/deploy_rnode.go:13–24  ·  view source on GitHub ↗

DeployRNode deploy rnode contract

(password string, nonce uint64)

Source from the content-addressed store, hash-verified

11
12// DeployRNode deploy rnode contract
13func DeployRNode(password string, nonce uint64) common.Address {
14 client, err, privateKey, _, fromAddress := config.Connect(password)
15 printBalance(client, fromAddress)
16 // Launch contract deploy transaction.
17 auth := newTransactor(privateKey, new(big.Int).SetUint64(nonce))
18 contractAddress, tx, _, err := rnode.DeployRnode(auth, client)
19 if err != nil {
20 log.Fatal(err.Error())
21 }
22 printTx(tx, err, client, contractAddress)
23 return contractAddress
24}

Callers

nothing calls this directly

Calls 5

newTransactorFunction · 0.85
printTxFunction · 0.85
printBalanceFunction · 0.70
FatalMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected