Skip to content

Commit

Permalink
Merge branch 'master' into fix-error
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush authored Sep 18, 2024
2 parents 489bbbf + 2fec97b commit fd30e2e
Show file tree
Hide file tree
Showing 277 changed files with 5,498 additions and 5,001 deletions.
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@

# review whenever someone opens a pull request.

* @darioush @ceyonur
* @ceyonur @darioush @ava-labs/platform-evm

2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ run:
skip-dirs-use-default: true
# Include non-test files tagged as test-only.
# Context: https://github.com/ava-labs/avalanchego/pull/3173
build-tags:
- test

linters:
disable-all: true
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
)

// The ABI holds information about a contract's context and available
// invokable methods. It will allow you to type check function calls and
// invocable methods. It will allow you to type check function calls and
// packs data accordingly.
type ABI struct {
Constructor Method
Expand Down
47 changes: 13 additions & 34 deletions accounts/abi/bind/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,47 +94,20 @@ type BlockHashContractCaller interface {
// used when the user does not provide some needed values, but rather leaves it up
// to the transactor to decide.
type ContractTransactor interface {
interfaces.GasEstimator
interfaces.GasPricer
interfaces.GasPricer1559
interfaces.TransactionSender

// HeaderByNumber returns a block header from the current canonical chain. If
// number is nil, the latest known header is returned.
HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)

// AcceptedCodeAt returns the code of the given account in the accepted state.
AcceptedCodeAt(ctx context.Context, account common.Address) ([]byte, error)

// AcceptedNonceAt retrieves the current accepted nonce associated with an account.
AcceptedNonceAt(ctx context.Context, account common.Address) (uint64, error)

// SuggestGasPrice retrieves the currently suggested gas price to allow a timely
// execution of a transaction.
SuggestGasPrice(ctx context.Context) (*big.Int, error)

// SuggestGasTipCap retrieves the currently suggested 1559 priority fee to allow
// a timely execution of a transaction.
SuggestGasTipCap(ctx context.Context) (*big.Int, error)

// EstimateGas tries to estimate the gas needed to execute a specific
// transaction based on the current pending state of the backend blockchain.
// 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 interfaces.CallMsg) (gas uint64, err error)

// SendTransaction injects the transaction into the pending pool for execution.
SendTransaction(ctx context.Context, tx *types.Transaction) error
}

// ContractFilterer defines the methods needed to access log events using one-off
// queries or continuous event subscriptions.
type ContractFilterer interface {
// FilterLogs executes a log filter operation, blocking during execution and
// returning all the results in one batch.
//
// TODO(karalabe): Deprecate when the subscription one can return past data too.
FilterLogs(ctx context.Context, query interfaces.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 interfaces.FilterQuery, ch chan<- types.Log) (interfaces.Subscription, error)
// NonceAt retrieves the nonce associated with an account.
NonceAt(ctx context.Context, account common.Address, blockNum *big.Int) (uint64, error)
}

// DeployBackend wraps the operations needed by WaitMined and WaitDeployed.
Expand All @@ -143,6 +116,12 @@ type DeployBackend interface {
CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)
}

// ContractFilterer defines the methods needed to access log events using one-off
// queries or continuous event subscriptions.
type ContractFilterer interface {
interfaces.LogFilterer
}

// ContractBackend defines the methods needed to work with contracts on a read-write basis.
type ContractBackend interface {
ContractCaller
Expand Down
Loading

0 comments on commit fd30e2e

Please sign in to comment.