refactor: move eth logic out of libstatus wrapper (#21)
This commit is contained in:
parent
5a0fd2d762
commit
62975ef419
|
@ -15,8 +15,8 @@ import unicode
|
|||
import transactions
|
||||
import algorithm
|
||||
import web3/[ethtypes, conversions], stew/byteutils, stint
|
||||
import libstatus/eth/contracts
|
||||
import libstatus/eth/transactions as eth_transactions
|
||||
import eth/contracts
|
||||
import eth/transactions as eth_transactions
|
||||
import chronicles, libp2p/[multihash, multicodec, cid]
|
||||
|
||||
import ./settings as status_settings
|
||||
|
|
|
@ -5,7 +5,7 @@ import
|
|||
web3/ethtypes, stew/byteutils, nimcrypto, json_serialization, chronicles
|
||||
|
||||
import
|
||||
../../types/[network_type], ../settings, ../coder, transactions, methods, ../../utils
|
||||
../types/[network_type], ../libstatus/settings, ../libstatus/coder, transactions, methods, ../utils
|
||||
|
||||
export
|
||||
GetPackData, PackData, BuyToken, ApproveAndCall, Transfer, BalanceOf, Register, SetPubkey,
|
|
@ -2,7 +2,7 @@ import
|
|||
web3/ethtypes
|
||||
|
||||
import
|
||||
transactions, ../../types/[rpc_response, transaction]
|
||||
transactions, ../types/[rpc_response, transaction]
|
||||
|
||||
proc sendTransaction*(tx: var TransactionData, password: string, success: var bool): string =
|
||||
success = true
|
|
@ -5,7 +5,7 @@ import
|
|||
nimcrypto, web3/[encoding, ethtypes]
|
||||
|
||||
import
|
||||
../../types/[rpc_response, transaction], ../coder, eth, transactions
|
||||
../types/[rpc_response, transaction], ../libstatus/coder, eth, transactions
|
||||
|
||||
export sendTransaction
|
||||
|
|
@ -5,7 +5,7 @@ import
|
|||
json_serialization, chronicles, web3/ethtypes
|
||||
|
||||
import
|
||||
../core, ../../types/[rpc_response, transaction], ../conversions
|
||||
../libstatus/core, ../types/[rpc_response, transaction], ../libstatus/conversions
|
||||
|
||||
proc estimateGas*(tx: TransactionData): RpcResponse =
|
||||
let response = core.callPrivateRPC("eth_estimateGas", %*[%tx])
|
|
@ -9,7 +9,7 @@ from nimcrypto import fromHex
|
|||
|
||||
import # status-desktop libs
|
||||
./core as status, ../types/[sticker, setting, rpc_response],
|
||||
./eth/contracts, ./settings, ./edn_helpers
|
||||
../eth/contracts, ./settings, ./edn_helpers
|
||||
|
||||
proc decodeContentHash*(value: string): string =
|
||||
if value == "":
|
||||
|
|
|
@ -5,7 +5,7 @@ import
|
|||
web3/[ethtypes, conversions], json_serialization
|
||||
|
||||
import
|
||||
./settings, ./core, ./wallet, ./eth/contracts,
|
||||
./settings, ./core, ./wallet, ../eth/contracts,
|
||||
../types/[setting, network_type, rpc_response]
|
||||
from ../utils import parseAddress
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import # project deps
|
|||
chronicles, web3/[ethtypes, conversions], stint
|
||||
|
||||
import # local deps
|
||||
libstatus/eth/contracts as status_contracts,
|
||||
eth/contracts as status_contracts,
|
||||
libstatus/stickers as status_stickers, transactions,
|
||||
libstatus/wallet, ../eventemitter
|
||||
import ./types/[sticker, transaction, rpc_response]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import libstatus/tokens as status_tokens
|
||||
import libstatus/eth/contracts
|
||||
import eth/contracts
|
||||
import ../eventemitter
|
||||
|
||||
type
|
||||
|
|
|
@ -8,7 +8,7 @@ import ../libstatus/accounts/constants as constants
|
|||
import ../libstatus/wallet as status_wallet
|
||||
import ../libstatus/settings as status_settings
|
||||
import ../libstatus/tokens as status_tokens
|
||||
import ../libstatus/eth/contracts as status_contracts
|
||||
import ../eth/contracts as status_contracts
|
||||
import web3/conversions
|
||||
from ../utils import parseAddress, wei2Eth
|
||||
import setting, network_type
|
||||
|
|
|
@ -8,7 +8,7 @@ import libstatus/tokens as status_tokens
|
|||
import libstatus/settings as status_settings
|
||||
import libstatus/wallet as status_wallet
|
||||
import libstatus/accounts/constants as constants
|
||||
import libstatus/eth/[eth, contracts]
|
||||
import eth/[eth, contracts]
|
||||
from libstatus/core import getBlockByNumber
|
||||
from utils as libstatus_utils import eth2Wei, gwei2Wei, wei2Gwei, first, toUInt64, parseAddress
|
||||
import wallet/[balance_manager, collectibles]
|
||||
|
|
|
@ -6,7 +6,7 @@ import # vendor libs
|
|||
stint
|
||||
|
||||
import # status-desktop libs
|
||||
../libstatus/core as status, ../libstatus/eth/contracts as contracts,
|
||||
../libstatus/core as status, ../eth/contracts as contracts,
|
||||
../stickers as status_stickers,
|
||||
web3/[conversions, ethtypes], ../utils, account
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import libstatus/tokens as status_tokens
|
|||
import libstatus/wallet as status_wallet
|
||||
import libstatus/network as status_network
|
||||
import libstatus/settings as status_settings
|
||||
import libstatus/eth/[contracts]
|
||||
import eth/[contracts]
|
||||
import wallet2/[balance_manager, collectibles, network]
|
||||
import wallet2/account as wallet_account
|
||||
import ./types/[account, transaction, network_type, setting, gas_prediction, rpc_response]
|
||||
|
|
|
@ -6,7 +6,7 @@ import # vendor libs
|
|||
stint
|
||||
|
||||
import # status-desktop libs
|
||||
../libstatus/core as status, ../libstatus/eth/contracts as contracts,
|
||||
../libstatus/core as status, ../eth/contracts as contracts,
|
||||
../stickers as status_stickers,
|
||||
web3/[conversions, ethtypes], ../utils, account
|
||||
|
||||
|
|
Loading…
Reference in New Issue