Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkmin committed May 13, 2022
1 parent d734dda commit df56fd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion services/construction/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (a *APIService) ConstructionPreprocess(
}
preprocessOutputOptions.GasPrice = bigObj
}

// Override gas_limit
if v, ok := request.Metadata["gas_limit"]; ok {
stringObj, ok := v.(string)
Expand Down
10 changes: 5 additions & 5 deletions services/construction/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ type Client interface {
) (*types.CallResponse, error)
}

// Nonce is a *big.Int so that its value can be checked against nil
// in MarshalJSON and ConstructionMetadata. If uint64 is used instead,
// Nonce and GasLimit are a *big.Int so that their values can be checked against nil
// in MarshalJSON and ConstructionMetadata. For nonce, if uint64 is used instead,
// its nil value will be 0 which is a valid nonce. This will cause
// ConstructionMetadata to make an extra call to eth_getTransactionCount
//
Expand All @@ -79,7 +79,7 @@ type options struct {
ContractAddress string `json:"contract_address,omitempty"`
Value *big.Int `json:"value,omitempty"`
GasPrice *big.Int `json:"gas_price,omitempty"`
GasLimit *big.Int `json:"gas_limit,omitempty"`
GasLimit *big.Int `json:"gas_limit,omitempty"`
MethodSignature string `json:"method_signature,omitempty"`
MethodArgs []string `json:"method_args,omitempty"`
}
Expand All @@ -93,7 +93,7 @@ type optionsWire struct {
ContractAddress string `json:"contract_address,omitempty"`
Value string `json:"value,omitempty"`
GasPrice string `json:"gas_price,omitempty"`
GasLimit string `json:"gas_limit,omitempty"`
GasLimit string `json:"gas_limit,omitempty"`
MethodSignature string `json:"method_signature,omitempty"`
MethodArgs []string `json:"method_args,omitempty"`
}
Expand Down Expand Up @@ -284,7 +284,7 @@ func (m *metadata) UnmarshalJSON(data []byte) error {
type parseMetadata struct {
Nonce uint64 `json:"nonce"`
GasPrice *big.Int `json:"gas_price"`
GasLimit uint64 `json:"gas_limit"`
GasLimit uint64 `json:"gas_limit"`
ChainID *big.Int `json:"chain_id"`
}

Expand Down

0 comments on commit df56fd0

Please sign in to comment.