From 654475de02eed45ab68aafae54ad9b776154c83c Mon Sep 17 00:00:00 2001 From: huuhadz2k <36265491+huuhadz2k@users.noreply.github.com> Date: Fri, 13 Apr 2018 12:30:56 +0700 Subject: [PATCH] =?UTF-8?q?Chuy=C3=AA=CC=89n=20=C4=91=C3=B4=CC=89i?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- accounts/abi/bind/backend.go | 14 +++++++------- accounts/abi/bind/backends/simulated.go | 2 +- accounts/abi/bind/base.go | 12 ++++++------ accounts/abi/bind/bind.go | 2 +- accounts/abi/bind/template.go | 22 +++++++++++----------- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/accounts/abi/bind/backend.go b/accounts/abi/bind/backend.go index 0b98983b67..38ea44f056 100644 --- a/accounts/abi/bind/backend.go +++ b/accounts/abi/bind/backend.go @@ -47,9 +47,9 @@ type ContractCaller interface { // CodeAt returns the code of the given account. This is needed to differentiate // between contract internal errors and the local chain being out of sync. CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error) - // ContractCall executes an Ethereum contract call with the specified data as the + // ContractCall executes an EtherFact contract call with the specified data as the // input. - CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) + CallContract(ctx context.Context, call etherfact.CallMsg, blockNumber *big.Int) ([]byte, error) } // PendingContractCaller defines methods to perform contract calls on the pending state. @@ -58,8 +58,8 @@ type ContractCaller interface { type PendingContractCaller interface { // PendingCodeAt returns the code of the given account in the pending state. PendingCodeAt(ctx context.Context, contract common.Address) ([]byte, error) - // PendingCallContract executes an Ethereum contract call against the pending state. - PendingCallContract(ctx context.Context, call ethereum.CallMsg) ([]byte, error) + // PendingCallContract executes an EtherFact contract call against the pending state. + PendingCallContract(ctx context.Context, call etherfact.CallMsg) ([]byte, error) } // ContractTransactor defines the methods needed to allow operating with contract @@ -79,7 +79,7 @@ type ContractTransactor interface { // There is no guarantee that this is the true gas limit requirement as other // transactions may be added or removed by miners, but it should provide a basis // for setting a reasonable default. - EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error) + EstimateGas(ctx context.Context, call etherfact.CallMsg) (gas uint64, err error) // SendTransaction injects the transaction into the pending pool for execution. SendTransaction(ctx context.Context, tx *types.Transaction) error } @@ -91,11 +91,11 @@ type ContractFilterer interface { // returning all the results in one batch. // // TODO(karalabe): Deprecate when the subscription one can return past data too. - FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error) + FilterLogs(ctx context.Context, query etherfact.FilterQuery) ([]types.Log, error) // SubscribeFilterLogs creates a background log filtering operation, returning // a subscription immediately, which can be used to stream the found events. - SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) + SubscribeFilterLogs(ctx context.Context, query etherfact.FilterQuery, ch chan<- types.Log) (etherfact.Subscription, error) } // DeployBackend wraps the operations needed by WaitMined and WaitDeployed. diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go index 5609ede9b7..efb9654cac 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -51,7 +51,7 @@ var errGasEstimationFailed = errors.New("gas required exceeds allowance or alway // the background. Its main purpose is to allow easily testing contract bindings. type SimulatedBackend struct { database ethdb.Database // In memory database to store our testing data - blockchain *core.BlockChain // Ethereum blockchain to handle the consensus + blockchain *core.BlockChain // EtherFact blockchain to handle the consensus mu sync.Mutex pendingBlock *types.Block // Currently pending block that will be imported on request diff --git a/accounts/abi/bind/base.go b/accounts/abi/bind/base.go index ed3e3d3c3a..b2b886c300 100644 --- a/accounts/abi/bind/base.go +++ b/accounts/abi/bind/base.go @@ -43,9 +43,9 @@ type CallOpts struct { } // TransactOpts is the collection of authorization data required to create a -// valid Ethereum transaction. +// valid EtherFact transaction. type TransactOpts struct { - From common.Address // Ethereum account to send the transaction from + From common.Address // EtherFact account to send the transaction from Nonce *big.Int // Nonce to use for the transaction execution (nil = use pending state) Signer SignerFn // Method to use for signing the transaction (mandatory) @@ -73,11 +73,11 @@ type WatchOpts struct { } // BoundContract is the base wrapper object that reflects a contract on the -// Ethereum network. It contains a collection of methods that are used by the +// EtherFact network. It contains a collection of methods that are used by the // higher level contract bindings to operate. type BoundContract struct { - address common.Address // Deployment address of the contract on the Ethereum blockchain - abi abi.ABI // Reflect based ABI to access the correct Ethereum methods + address common.Address // Deployment address of the contract on the EtherFact blockchain + abi abi.ABI // Reflect based ABI to access the correct EtherFact methods caller ContractCaller // Read interface to interact with the blockchain transactor ContractTransactor // Write interface to interact with the blockchain filterer ContractFilterer // Event filtering to interact with the blockchain @@ -95,7 +95,7 @@ func NewBoundContract(address common.Address, abi abi.ABI, caller ContractCaller } } -// DeployContract deploys a contract onto the Ethereum blockchain and binds the +// DeployContract deploys a contract onto the EtherFact blockchain and binds the // deployment address with a Go wrapper. func DeployContract(opts *TransactOpts, abi abi.ABI, bytecode []byte, backend ContractBackend, params ...interface{}) (common.Address, *types.Transaction, *BoundContract, error) { // Otherwise try to deploy the contract diff --git a/accounts/abi/bind/bind.go b/accounts/abi/bind/bind.go index c9d70494fc..8d70ead7ab 100644 --- a/accounts/abi/bind/bind.go +++ b/accounts/abi/bind/bind.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-etherfact library. If not, see . -// Package bind generates Ethereum contract Go bindings. +// Package bind generates EtherFact contract Go bindings. // // Detailed usage document and tutorial available on the go-etherfact Wiki page: // https://github.com/EtherFact-Project/go-etherfact/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts diff --git a/accounts/abi/bind/template.go b/accounts/abi/bind/template.go index f203b68f7b..a310c8c63c 100644 --- a/accounts/abi/bind/template.go +++ b/accounts/abi/bind/template.go @@ -72,7 +72,7 @@ package {{.Package}} // {{.Type}}Bin is the compiled bytecode used for deploying new contracts. const {{.Type}}Bin = ` + "`" + `{{.InputBin}}` + "`" + ` - // Deploy{{.Type}} deploys a new Ethereum contract, binding an instance of {{.Type}} to it. + // Deploy{{.Type}} deploys a new EtherFact contract, binding an instance of {{.Type}} to it. func Deploy{{.Type}}(auth *bind.TransactOpts, backend bind.ContractBackend {{range .Constructor.Inputs}}, {{.Name}} {{bindtype .Type}}{{end}}) (common.Address, *types.Transaction, *{{.Type}}, error) { parsed, err := abi.JSON(strings.NewReader({{.Type}}ABI)) if err != nil { @@ -86,29 +86,29 @@ package {{.Package}} } {{end}} - // {{.Type}} is an auto generated Go binding around an Ethereum contract. + // {{.Type}} is an auto generated Go binding around an EtherFact contract. type {{.Type}} struct { {{.Type}}Caller // Read-only binding to the contract {{.Type}}Transactor // Write-only binding to the contract {{.Type}}Filterer // Log filterer for contract events } - // {{.Type}}Caller is an auto generated read-only Go binding around an Ethereum contract. + // {{.Type}}Caller is an auto generated read-only Go binding around an EtherFact contract. type {{.Type}}Caller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } - // {{.Type}}Transactor is an auto generated write-only Go binding around an Ethereum contract. + // {{.Type}}Transactor is an auto generated write-only Go binding around an EtherFact contract. type {{.Type}}Transactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } - // {{.Type}}Filterer is an auto generated log filtering Go binding around an Ethereum contract events. + // {{.Type}}Filterer is an auto generated log filtering Go binding around an EtherFact contract events. type {{.Type}}Filterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } - // {{.Type}}Session is an auto generated Go binding around an Ethereum contract, + // {{.Type}}Session is an auto generated Go binding around an EtherFact contract, // with pre-set call and transact options. type {{.Type}}Session struct { Contract *{{.Type}} // Generic contract binding to set the session for @@ -116,31 +116,31 @@ package {{.Package}} TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } - // {{.Type}}CallerSession is an auto generated read-only Go binding around an Ethereum contract, + // {{.Type}}CallerSession is an auto generated read-only Go binding around an EtherFact contract, // with pre-set call options. type {{.Type}}CallerSession struct { Contract *{{.Type}}Caller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } - // {{.Type}}TransactorSession is an auto generated write-only Go binding around an Ethereum contract, + // {{.Type}}TransactorSession is an auto generated write-only Go binding around an EtherFact contract, // with pre-set transact options. type {{.Type}}TransactorSession struct { Contract *{{.Type}}Transactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } - // {{.Type}}Raw is an auto generated low-level Go binding around an Ethereum contract. + // {{.Type}}Raw is an auto generated low-level Go binding around an EtherFact contract. type {{.Type}}Raw struct { Contract *{{.Type}} // Generic contract binding to access the raw methods on } - // {{.Type}}CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. + // {{.Type}}CallerRaw is an auto generated low-level read-only Go binding around an EtherFact contract. type {{.Type}}CallerRaw struct { Contract *{{.Type}}Caller // Generic read-only contract binding to access the raw methods on } - // {{.Type}}TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. + // {{.Type}}TransactorRaw is an auto generated low-level write-only Go binding around an EtherFact contract. type {{.Type}}TransactorRaw struct { Contract *{{.Type}}Transactor // Generic write-only contract binding to access the raw methods on }