doNothingTC

package
v1.9.0-tc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2022 License: MIT, Apache-2.0 Imports: 15 Imported by: 0

README

doNothingTC

Test Case Description

doNothingTC is based on the DoNothing benchmark in BlockBench.

For your reference, the original description of DoNothing benchmark in the SIGMOD paper is like the below:

This contract accepts transaction as input and simply returns. In other words, it involves minimal number of operations at the execution layer and data model layer, thus the overall performance will be mainly determined by the consensus layer. Previous works on performance of blockchain consensus protocol use time to consensus to measure its performance. In BLOCKBENCH, this metric is directly reflected in the transaction latency.

doNothingTC implements a Go test function that calls the nothing function, whose body is empty (i.e., does nothing), in the Nothing contract implemented in DoNothing.sol.

Function Description
Run Call the nothing function, which does nothing, in the DoNothing contract

Source Files

This directory has the following source files.

References

Documentation

Overview

Package doNothingTC implements BlockBench's DoNothing benchmark for Klaytn and Locust. See README.md for more details.

Index

Constants

View Source
const DoNothingABI = "" /* 147-byte string literal not displayed */

DoNothingABI is the input ABI used to generate the binding from.

View Source
const DoNothingBin = `` /* 328-byte string literal not displayed */

DoNothingBin is the compiled bytecode used for deploying new contracts.

View Source
const DoNothingBinRuntime = `` /* 268-byte string literal not displayed */

DoNothingBinRuntime is the compiled bytecode used for adding genesis block without deploying code.

View Source
const Name = "doNothingTC"

Variables

This section is empty.

Functions

func Init

func Init(accs []*account.Account, endpoint string, gp *big.Int)

Init initializes cliPool and accGrp; and also deploys the smart contract.

func Run

func Run()

Types

type DoNothing

type DoNothing struct {
	DoNothingCaller     // Read-only binding to the contract
	DoNothingTransactor // Write-only binding to the contract
	DoNothingFilterer   // Log filterer for contract events
}

DoNothing is an auto generated Go binding around an GXP contract.

func DeployDoNothing

func DeployDoNothing(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *DoNothing, error)

DeployDoNothing deploys a new GXP contract, binding an instance of DoNothing to it.

func NewDoNothing

func NewDoNothing(address common.Address, backend bind.ContractBackend) (*DoNothing, error)

NewDoNothing creates a new instance of DoNothing, bound to a specific deployed contract.

type DoNothingCaller

type DoNothingCaller struct {
	// contains filtered or unexported fields
}

DoNothingCaller is an auto generated read-only Go binding around an GXP contract.

func NewDoNothingCaller

func NewDoNothingCaller(address common.Address, caller bind.ContractCaller) (*DoNothingCaller, error)

NewDoNothingCaller creates a new read-only instance of DoNothing, bound to a specific deployed contract.

type DoNothingCallerRaw

type DoNothingCallerRaw struct {
	Contract *DoNothingCaller // Generic read-only contract binding to access the raw methods on
}

DoNothingCallerRaw is an auto generated low-level read-only Go binding around an GXP contract.

func (*DoNothingCallerRaw) Call

func (_DoNothing *DoNothingCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type DoNothingCallerSession

type DoNothingCallerSession struct {
	Contract *DoNothingCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts    // Call options to use throughout this session
}

DoNothingCallerSession is an auto generated read-only Go binding around an GXP contract, with pre-set call options.

type DoNothingFilterer

type DoNothingFilterer struct {
	// contains filtered or unexported fields
}

DoNothingFilterer is an auto generated log filtering Go binding around an GXP contract events.

func NewDoNothingFilterer

func NewDoNothingFilterer(address common.Address, filterer bind.ContractFilterer) (*DoNothingFilterer, error)

NewDoNothingFilterer creates a new log filterer instance of DoNothing, bound to a specific deployed contract.

type DoNothingRaw

type DoNothingRaw struct {
	Contract *DoNothing // Generic contract binding to access the raw methods on
}

DoNothingRaw is an auto generated low-level Go binding around an GXP contract.

func (*DoNothingRaw) Call

func (_DoNothing *DoNothingRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*DoNothingRaw) Transact

func (_DoNothing *DoNothingRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*DoNothingRaw) Transfer

func (_DoNothing *DoNothingRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type DoNothingSession

type DoNothingSession struct {
	Contract     *DoNothing        // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

DoNothingSession is an auto generated Go binding around an GXP contract, with pre-set call and transact options.

func (*DoNothingSession) Nothing

func (_DoNothing *DoNothingSession) Nothing() (*types.Transaction, error)

Nothing is a paid mutator transaction binding the contract method 0x448f30a3.

Solidity: function nothing() returns()

type DoNothingTransactor

type DoNothingTransactor struct {
	// contains filtered or unexported fields
}

DoNothingTransactor is an auto generated write-only Go binding around an GXP contract.

func NewDoNothingTransactor

func NewDoNothingTransactor(address common.Address, transactor bind.ContractTransactor) (*DoNothingTransactor, error)

NewDoNothingTransactor creates a new write-only instance of DoNothing, bound to a specific deployed contract.

func (*DoNothingTransactor) Nothing

func (_DoNothing *DoNothingTransactor) Nothing(opts *bind.TransactOpts) (*types.Transaction, error)

Nothing is a paid mutator transaction binding the contract method 0x448f30a3.

Solidity: function nothing() returns()

type DoNothingTransactorRaw

type DoNothingTransactorRaw struct {
	Contract *DoNothingTransactor // Generic write-only contract binding to access the raw methods on
}

DoNothingTransactorRaw is an auto generated low-level write-only Go binding around an GXP contract.

func (*DoNothingTransactorRaw) Transact

func (_DoNothing *DoNothingTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*DoNothingTransactorRaw) Transfer

func (_DoNothing *DoNothingTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type DoNothingTransactorSession

type DoNothingTransactorSession struct {
	Contract     *DoNothingTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts    // Transaction auth options to use throughout this session
}

DoNothingTransactorSession is an auto generated write-only Go binding around an GXP contract, with pre-set transact options.

func (*DoNothingTransactorSession) Nothing

func (_DoNothing *DoNothingTransactorSession) Nothing() (*types.Transaction, error)

Nothing is a paid mutator transaction binding the contract method 0x448f30a3.

Solidity: function nothing() returns()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL