diff options
author | Jhih-Ming Huang <jm@dexon.org> | 2019-04-10 22:29:35 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-10 22:29:35 +0800 |
commit | 675a9441784b14ee4bd996832c4431adc291c5af (patch) | |
tree | 58d76052f28fd5808605f592a52f297f862f9ef7 /accounts | |
parent | b102e88097d7555b776e95565355ab3dacced1f9 (diff) | |
download | dexon-675a9441784b14ee4bd996832c4431adc291c5af.tar dexon-675a9441784b14ee4bd996832c4431adc291c5af.tar.gz dexon-675a9441784b14ee4bd996832c4431adc291c5af.tar.bz2 dexon-675a9441784b14ee4bd996832c4431adc291c5af.tar.lz dexon-675a9441784b14ee4bd996832c4431adc291c5af.tar.xz dexon-675a9441784b14ee4bd996832c4431adc291c5af.tar.zst dexon-675a9441784b14ee4bd996832c4431adc291c5af.zip |
fixup! Change import go github.com/dexon-foundation/dexon
Diffstat (limited to 'accounts')
-rw-r--r-- | accounts/abi/bind/backend.go | 10 | ||||
-rw-r--r-- | accounts/abi/bind/backends/simulated.go | 14 | ||||
-rw-r--r-- | accounts/abi/bind/base.go | 8 |
3 files changed, 16 insertions, 16 deletions
diff --git a/accounts/abi/bind/backend.go b/accounts/abi/bind/backend.go index 099c0f9cc..54b9f808f 100644 --- a/accounts/abi/bind/backend.go +++ b/accounts/abi/bind/backend.go @@ -49,7 +49,7 @@ type ContractCaller interface { CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error) // ContractCall executes an Ethereum 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 dexon.CallMsg, blockNumber *big.Int) ([]byte, error) } // PendingContractCaller defines methods to perform contract calls on the pending state. @@ -59,7 +59,7 @@ 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(ctx context.Context, call dexon.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 dexon.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 dexon.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 dexon.FilterQuery, ch chan<- types.Log) (dexon.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 c4048b503..00e5cf482 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -173,7 +173,7 @@ func (b *SimulatedBackend) PendingCodeAt(ctx context.Context, contract common.Ad } // CallContract executes a contract call. -func (b *SimulatedBackend) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { +func (b *SimulatedBackend) CallContract(ctx context.Context, call dexon.CallMsg, blockNumber *big.Int) ([]byte, error) { b.mu.Lock() defer b.mu.Unlock() @@ -189,7 +189,7 @@ func (b *SimulatedBackend) CallContract(ctx context.Context, call ethereum.CallM } // PendingCallContract executes a contract call on the pending state. -func (b *SimulatedBackend) PendingCallContract(ctx context.Context, call ethereum.CallMsg) ([]byte, error) { +func (b *SimulatedBackend) PendingCallContract(ctx context.Context, call dexon.CallMsg) ([]byte, error) { b.mu.Lock() defer b.mu.Unlock() defer b.pendingState.RevertToSnapshot(b.pendingState.Snapshot()) @@ -215,7 +215,7 @@ func (b *SimulatedBackend) SuggestGasPrice(ctx context.Context) (*big.Int, error // EstimateGas executes the requested code against the currently pending block/state and // returns the used amount of gas. -func (b *SimulatedBackend) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error) { +func (b *SimulatedBackend) EstimateGas(ctx context.Context, call dexon.CallMsg) (uint64, error) { b.mu.Lock() defer b.mu.Unlock() @@ -265,7 +265,7 @@ func (b *SimulatedBackend) EstimateGas(ctx context.Context, call ethereum.CallMs // callContract implements common code between normal and pending contract calls. // state is modified during execution, make sure to copy it if necessary. -func (b *SimulatedBackend) callContract(ctx context.Context, call ethereum.CallMsg, block *types.Block, statedb *state.StateDB) ([]byte, uint64, bool, error) { +func (b *SimulatedBackend) callContract(ctx context.Context, call dexon.CallMsg, block *types.Block, statedb *state.StateDB) ([]byte, uint64, bool, error) { // Ensure message is initialized properly. if call.GasPrice == nil { call.GasPrice = big.NewInt(1) @@ -323,7 +323,7 @@ func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx *types.Transa // returning all the results in one batch. // // TODO(karalabe): Deprecate when the subscription one can return past data too. -func (b *SimulatedBackend) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error) { +func (b *SimulatedBackend) FilterLogs(ctx context.Context, query dexon.FilterQuery) ([]types.Log, error) { var filter *filters.Filter if query.BlockHash != nil { // Block filter requested, construct a single-shot filter @@ -355,7 +355,7 @@ func (b *SimulatedBackend) FilterLogs(ctx context.Context, query ethereum.Filter // SubscribeFilterLogs creates a background log filtering operation, returning a // subscription immediately, which can be used to stream the found events. -func (b *SimulatedBackend) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) { +func (b *SimulatedBackend) SubscribeFilterLogs(ctx context.Context, query dexon.FilterQuery, ch chan<- types.Log) (dexon.Subscription, error) { // Subscribe to contract events sink := make(chan []*types.Log) @@ -407,7 +407,7 @@ func (b *SimulatedBackend) AdjustTime(adjustment time.Duration) error { // callmsg implements core.Message to allow passing it as a transaction simulator. type callmsg struct { - ethereum.CallMsg + dexon.CallMsg } func (m callmsg) From() common.Address { return m.CallMsg.From } diff --git a/accounts/abi/bind/base.go b/accounts/abi/bind/base.go index b88795aa8..8def0b621 100644 --- a/accounts/abi/bind/base.go +++ b/accounts/abi/bind/base.go @@ -128,7 +128,7 @@ func (c *BoundContract) Call(opts *CallOpts, result interface{}, method string, return err } var ( - msg = ethereum.CallMsg{From: opts.From, To: &c.address, Data: input} + msg = dexon.CallMsg{From: opts.From, To: &c.address, Data: input} ctx = ensureContext(opts.Context) code []byte output []byte @@ -218,7 +218,7 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i } } // If the contract surely has code (or code is not needed), estimate the transaction - msg := ethereum.CallMsg{From: opts.From, To: contract, Value: value, Data: input} + msg := dexon.CallMsg{From: opts.From, To: contract, Value: value, Data: input} gasLimit, err = c.transactor.EstimateGas(ensureContext(opts.Context), msg) if err != nil { return nil, fmt.Errorf("failed to estimate gas needed: %v", err) @@ -261,7 +261,7 @@ func (c *BoundContract) FilterLogs(opts *FilterOpts, name string, query ...[]int // Start the background filtering logs := make(chan types.Log, 128) - config := ethereum.FilterQuery{ + config := dexon.FilterQuery{ Addresses: []common.Address{c.address}, Topics: topics, FromBlock: new(big.Int).SetUint64(opts.Start), @@ -310,7 +310,7 @@ func (c *BoundContract) WatchLogs(opts *WatchOpts, name string, query ...[]inter // Start the background filtering logs := make(chan types.Log, 128) - config := ethereum.FilterQuery{ + config := dexon.FilterQuery{ Addresses: []common.Address{c.address}, Topics: topics, } |