aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/bind/backend.go
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/abi/bind/backend.go')
-rw-r--r--accounts/abi/bind/backend.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/accounts/abi/bind/backend.go b/accounts/abi/bind/backend.go
index 3d38f87cd..a4e90914f 100644
--- a/accounts/abi/bind/backend.go
+++ b/accounts/abi/bind/backend.go
@@ -35,6 +35,10 @@ var (
// This error is raised when attempting to perform a pending state action
// on a backend that doesn't implement PendingContractCaller.
ErrNoPendingState = errors.New("backend does not support pending state")
+
+ // This error is returned by WaitDeployed if contract creation leaves an
+ // empty contract behind.
+ ErrNoCodeAfterDeploy = errors.New("no contract code after deployment")
)
// ContractCaller defines the methods needed to allow operating with contract on a read
@@ -48,6 +52,12 @@ type ContractCaller interface {
CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
}
+// DeployBackend wraps the operations needed by WaitMined and WaitDeployed.
+type DeployBackend interface {
+ TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
+ CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)
+}
+
// PendingContractCaller defines methods to perform contract calls on the pending state.
// Call will try to discover this interface when access to the pending state is requested.
// If the backend does not support the pending state, Call returns ErrNoPendingState.