MCPcopy Create free account
hub / github.com/DNAProject/DNA / InvokeWasmVMContract

Function InvokeWasmVMContract

cmd/utils/gas.go:653–664  ·  view source on GitHub ↗

Invoke wasm vm smart contract. if isPreExec is true, the invoke will not really execute

(
	gasPrice,
	gasLimit uint64,
	signer *account.Account,
	smartcodeAddress common.Address,
	params []interface{})

Source from the content-addressed store, hash-verified

651
652//Invoke wasm vm smart contract. if isPreExec is true, the invoke will not really execute
653func InvokeWasmVMContract(
654 gasPrice,
655 gasLimit uint64,
656 signer *account.Account,
657 smartcodeAddress common.Address,
658 params []interface{}) (string, error) {
659 tx, err := cutils.NewWasmVMInvokeTransaction(gasPrice, gasLimit, smartcodeAddress, params)
660 if err != nil {
661 return "", err
662 }
663 return InvokeSmartContract(signer, tx)
664}
665
666//InvokeSmartContract is low level method to invoke contact.
667func InvokeSmartContract(signer *account.Account, tx *types.MutableTransaction) (string, error) {

Callers 1

invokeContractFunction · 0.92

Calls 1

InvokeSmartContractFunction · 0.85

Tested by

no test coverage detected