Sha256: ba3974f592f6f4af1dc24bbcbd71d21270db0c3ff33a86ab38cf4fd6260eb01c
Contents?: true
Size: 884 Bytes
Versions: 3
Compression:
Stored size: 884 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('hmy_call', params: params)) end # get deployed contract's byte code def get_code(address) params = [address, 'latest'] response(post('hmy_getCode', params: params)) end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
harmony-api-0.1.2 | lib/harmony/api/v1/contracts/contract.rb |
harmony-api-0.1.1 | lib/harmony/api/v1/contracts/contract.rb |
harmony-api-0.1.0 | lib/harmony/api/v1/contracts/contract.rb |