Skip to content

Commit

Permalink
docs: clean up (#113)
Browse files Browse the repository at this point in the history
Signed-off-by: Jingfu Wang <jingfu.wang@coinbase.com>
  • Loading branch information
GeekArthur authored Nov 4, 2023
1 parent a15f164 commit f1d98ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,8 @@ func (ec *SDKClient) GetErc20TransferGasLimit(
return 0, fmt.Errorf("unable to find contract info for currency %s", currency.Symbol)
}

// ToAddress for erc20 transfers is the contract address
// toAddress in function param is the address to receive token
// the To address in EstimateGas is the contract address
contractAddress := common.HexToAddress(contract.(string))
data := GenerateErc20TransferData(toAddress, value)
gasLimit, err := ec.EstimateGas(ctx, ethereum.CallMsg{
Expand Down
1 change: 1 addition & 0 deletions services/construction/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func (s APIService) ConstructionMetadata( //nolint
return nil, sdkTypes.WrapErr(sdkTypes.ErrGasPriceError, err)
}

// Calculate contract data for contract call
if len(input.ContractAddress) > 0 && len(input.ContractData) == 0 {
contractData, err := ConstructContractCallDataGeneric(input.MethodSignature, input.MethodArgs)
if err != nil {
Expand Down

0 comments on commit f1d98ad

Please sign in to comment.