MCPcopy Create free account
hub / github.com/ardanlabs/smartcontract / DeployBasic

Function DeployBasic

app/basic/contract/go/basic/basic.go:47–61  ·  view source on GitHub ↗

DeployBasic deploys a new Ethereum contract, binding an instance of Basic to it.

(auth *bind.TransactOpts, backend bind.ContractBackend)

Source from the content-addressed store, hash-verified

45
46// DeployBasic deploys a new Ethereum contract, binding an instance of Basic to it.
47func DeployBasic(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Basic, error) {
48 parsed, err := BasicMetaData.GetAbi()
49 if err != nil {
50 return common.Address{}, nil, nil, err
51 }
52 if parsed == nil {
53 return common.Address{}, nil, nil, errors.New("GetABI returned nil")
54 }
55
56 address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BasicBin), backend)
57 if err != nil {
58 return common.Address{}, nil, nil, err
59 }
60 return address, tx, &Basic{BasicCaller: BasicCaller{contract: contract}, BasicTransactor: BasicTransactor{contract: contract}, BasicFilterer: BasicFilterer{contract: contract}}, nil
61}
62
63// Basic is an auto generated Go binding around an Ethereum contract.
64type Basic struct {

Callers 2

TestBasicFunction · 0.92
runFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestBasicFunction · 0.74