Sha256: e4ad829de8df4df5224b67e806db9c876d4ddc12d2fb00c0519946f9d1f36f83
Contents?: true
Size: 876 Bytes
Versions: 2
Compression:
Stored size: 876 Bytes
Contents
# frozen_string_literal: true module Harmony module Api module V1 module Contracts module Contract def estimate_gas response(post('estimateGas')) end # get storage position at a given address def get_storage_at(address, key, block_number) params = [address, key, Harmony::Api::Utilities.int_to_hex(block_number)] response(post('getStorageAt', params: params)) end # call contract method def call(address) params = [{ to: address }, 'latest'] response(post('call', params: params)) end # get deployed contract's byte code def get_code(address) params = [address, 'latest'] response(post('getCode', params: params)) end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
harmony-api-0.1.4 | lib/harmony/api/v1/contracts/contract.rb |
harmony-api-0.1.3 | lib/harmony/api/v1/contracts/contract.rb |