module Ethereum::Payment

Extended Modules

Defined in:

ethereum/payment.cr

Constant Summary

ETH_CONTRACT_GAS_LIMIT = "100000"
ETH_SEND_GAS_LIMIT = "21000"

Instance Method Summary

Instance Method Detail

def convert_nonce(nonce : Int64 | Nil) #

[View source]
def estimate_gas_limit(to : String, contract_hex : String = "") : String #

[View source]
def estimate_gas_limit : String #

[View source]
def get_current_gas_price : String #

[View source]
def get_current_nonce(from : String) : Int64 #

[View source]
def send_by_signed(tx_raw : String) : String #

[View source]
def sign(from : String, to : String, amount : String, secret : String, gas_limit : String = ETH_SEND_GAS_LIMIT, gas_price : String = get_current_gas_price, nonce : Int64 | Nil = nil) : Response::Payment::Sign #

[View source]
def sign_contract(from : String, secret : String, contract_address : String, contract_hex : String, gas_limit = ETH_CONTRACT_GAS_LIMIT, gas_price = get_current_gas_price, nonce : Int64 | Nil = nil) : Response::Payment::Sign #

[View source]
def to_wei(eth : String) : String #

[View source]