WIP Remove web3 from tests
This commit is contained in:
parent
958bd9af96
commit
e20a099570
@ -2,7 +2,6 @@
|
||||
import logging
|
||||
|
||||
# third-party imports
|
||||
import web3
|
||||
import celery
|
||||
from cic_registry.chain import ChainSpec
|
||||
from erc20_single_shot_faucet import Faucet
|
||||
@ -13,6 +12,7 @@ from chainlib.eth.sign import (
|
||||
new_account,
|
||||
sign_message,
|
||||
)
|
||||
from chainlib.eth.address import to_checksum_address
|
||||
|
||||
# local import
|
||||
from cic_eth.registry import safe_registry
|
||||
@ -126,7 +126,7 @@ def unpack_register(data):
|
||||
|
||||
d = data[8:]
|
||||
return {
|
||||
'to': web3.Web3.toChecksumAddress('0x' + d[64-40:64]),
|
||||
'to': to_checksum_address(d[64-40:64]),
|
||||
}
|
||||
|
||||
|
||||
@ -146,7 +146,7 @@ def unpack_gift(data):
|
||||
|
||||
d = data[8:]
|
||||
return {
|
||||
'to': web3.Web3.toChecksumAddress('0x' + d[64-40:64]),
|
||||
'to': to_checksum_address(d[64-40:64]),
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
# standard imports
|
||||
import logging
|
||||
|
||||
# external imports
|
||||
from chainlib.eth.gas import price
|
||||
from hexathon import strip_0x
|
||||
|
||||
# local imports
|
||||
from cic_eth.db.models.role import AccountRole
|
||||
from cic_eth.db.models.base import SessionBase
|
||||
@ -19,9 +23,14 @@ class GasOracle():
|
||||
__refill_amount_value = __safe_threshold_amount_value * 5
|
||||
default_gas_limit = 21000
|
||||
|
||||
def __init__(self, w3):
|
||||
self.w3 = w3
|
||||
self.gas_price_current = w3.eth.gas_price()
|
||||
def __init__(self, conn):
|
||||
o = price()
|
||||
r = conn.do(o)
|
||||
b = bytes.from_hex(strip_0x(r))
|
||||
self.gas_price_current = int.from_bytes(b, 'big')
|
||||
|
||||
#self.w3 = w3
|
||||
#self.gas_price_current = w3.eth.gas_price()
|
||||
|
||||
|
||||
def safe_threshold_amount(self):
|
||||
|
@ -4,9 +4,20 @@ import logging
|
||||
# third-party imports
|
||||
import celery
|
||||
import requests
|
||||
import web3
|
||||
from cic_registry import zero_address
|
||||
from cic_registry.chain import ChainSpec
|
||||
from chainlib.eth.address import is_checksum_address
|
||||
from chainlib.eth.gas import balance
|
||||
from chainlib.eth.error import (
|
||||
EthException,
|
||||
NotFoundEthException,
|
||||
)
|
||||
from chainlib.eth.tx import (
|
||||
transaction,
|
||||
receipt,
|
||||
)
|
||||
from chainlib.hash import keccak256_hex_to_hex
|
||||
|
||||
|
||||
# local imports
|
||||
from .rpc import RpcClient
|
||||
@ -80,7 +91,8 @@ def check_gas(self, tx_hashes, chain_str, txs=[], address=None, gas_required=Non
|
||||
if address == None:
|
||||
address = o['address']
|
||||
|
||||
if not web3.Web3.isChecksumAddress(address):
|
||||
#if not web3.Web3.isChecksumAddress(address):
|
||||
if not is_checksum_address(address):
|
||||
raise ValueError('invalid address {}'.format(address))
|
||||
|
||||
chain_spec = ChainSpec.from_chain_str(chain_str)
|
||||
@ -88,13 +100,16 @@ def check_gas(self, tx_hashes, chain_str, txs=[], address=None, gas_required=Non
|
||||
queue = self.request.delivery_info['routing_key']
|
||||
|
||||
#c = RpcClient(chain_spec, holder_address=address)
|
||||
c = RpcClient(chain_spec)
|
||||
#c = RpcClient(chain_spec)
|
||||
conn = RPCConnection.connect()
|
||||
|
||||
# TODO: it should not be necessary to pass address explicitly, if not passed should be derived from the tx
|
||||
balance = 0
|
||||
try:
|
||||
balance = c.w3.eth.getBalance(address)
|
||||
except ValueError as e:
|
||||
#balance = c.w3.eth.getBalance(address)
|
||||
o = balance(address)
|
||||
r = conn.do(o)
|
||||
except EthException as e:
|
||||
raise EthError('balance call for {}: {}'.format(address, e))
|
||||
|
||||
logg.debug('address {} has gas {} needs {}'.format(address, balance, gas_required))
|
||||
@ -394,8 +409,9 @@ def send(self, txs, chain_str):
|
||||
tx_hex = txs[0]
|
||||
logg.debug('send transaction {}'.format(tx_hex))
|
||||
|
||||
tx_hash = web3.Web3.keccak(hexstr=tx_hex)
|
||||
tx_hash_hex = tx_hash.hex()
|
||||
tx_hash = add_0x(keccak256_hex_to_hex())
|
||||
#tx_hash = web3.Web3.keccak(hexstr=tx_hex)
|
||||
#tx_hash_hex = tx_hash.hex()
|
||||
|
||||
queue = self.request.delivery_info.get('routing_key', None)
|
||||
|
||||
@ -434,7 +450,7 @@ def send(self, txs, chain_str):
|
||||
|
||||
# TODO: if this method fails the nonce will be out of sequence. session needs to be extended to include the queue create, so that nonce is rolled back if the second sql query fails. Better yet, split each state change into separate tasks.
|
||||
# TODO: method is too long, factor out code for clarity
|
||||
@celery_app.task(bind=True, throws=(web3.exceptions.TransactionNotFound,), base=CriticalWeb3AndSignerTask)
|
||||
@celery_app.task(bind=True, throws=(NotFoundEthException,), base=CriticalWeb3AndSignerTask)
|
||||
def refill_gas(self, recipient_address, chain_str):
|
||||
"""Executes a native token transaction to fund the recipient's gas expenditures.
|
||||
|
||||
@ -467,9 +483,15 @@ def refill_gas(self, recipient_address, chain_str):
|
||||
queue = self.request.delivery_info['routing_key']
|
||||
|
||||
c = RpcClient(chain_spec)
|
||||
clogg = celery_app.log.get_default_logger()
|
||||
conn = RPCConnection.connect()
|
||||
logg.debug('refill gas from provider address {}'.format(c.gas_provider()))
|
||||
default_nonce = c.w3.eth.getTransactionCount(c.gas_provider(), 'pending')
|
||||
|
||||
# Get default nonce to use from network if no nonce has been set
|
||||
# TODO: This step may be redundant as nonce entry is set at account creation time
|
||||
#default_nonce = c.w3.eth.getTransactionCount(c.gas_provider(), 'pending')
|
||||
o = count_pending(c.gas_provider())
|
||||
default_nonce = conn.do(o)
|
||||
|
||||
nonce_generator = NonceOracle(c.gas_provider(), default_nonce)
|
||||
#nonce = nonce_generator.next(session=session)
|
||||
nonce = nonce_generator.next_by_task_uuid(self.request.root_id, session=session)
|
||||
@ -491,9 +513,10 @@ def refill_gas(self, recipient_address, chain_str):
|
||||
'value': refill_amount,
|
||||
'data': '',
|
||||
}
|
||||
tx_send_gas_signed = c.w3.eth.sign_transaction(tx_send_gas)
|
||||
tx_hash = web3.Web3.keccak(hexstr=tx_send_gas_signed['raw'])
|
||||
tx_hash_hex = tx_hash.hex()
|
||||
#tx_send_gas_signed = c.w3.eth.sign_transaction(tx_send_gas)
|
||||
#tx_hash = web3.Web3.keccak(hexstr=tx_send_gas_signed['raw'])
|
||||
#tx_hash_hex = tx_hash.hex()
|
||||
(tx_hash_hex, tx_send_gas_signed) = sign_tx(tx_send_gas)
|
||||
|
||||
# TODO: route this through sign_and_register_tx instead
|
||||
logg.debug('adding queue refill gas tx {}'.format(tx_hash_hex))
|
||||
@ -612,14 +635,15 @@ def reserve_nonce(self, chained_input, signer=None):
|
||||
address = chained_input
|
||||
logg.debug('non-explicit address for reserve nonce, using arg head {}'.format(chained_input))
|
||||
else:
|
||||
if web3.Web3.isChecksumAddress(signer):
|
||||
#if web3.Web3.isChecksumAddress(signer):
|
||||
if is_checksum_address(signer):
|
||||
address = signer
|
||||
logg.debug('explicit address for reserve nonce {}'.format(signer))
|
||||
else:
|
||||
address = AccountRole.get_address(signer, session=session)
|
||||
logg.debug('role for reserve nonce {} -> {}'.format(signer, address))
|
||||
|
||||
if not web3.Web3.isChecksumAddress(address):
|
||||
if not is_checksum_address(address):
|
||||
raise ValueError('invalid result when resolving address for nonce {}'.format(address))
|
||||
|
||||
root_id = self.request.root_id
|
||||
@ -632,7 +656,7 @@ def reserve_nonce(self, chained_input, signer=None):
|
||||
return chained_input
|
||||
|
||||
|
||||
@celery_app.task(bind=True, throws=(web3.exceptions.TransactionNotFound,), base=CriticalWeb3Task)
|
||||
@celery_app.task(bind=True, throws=(NotFoundEthException,), base=CriticalWeb3Task)
|
||||
def sync_tx(self, tx_hash_hex, chain_str):
|
||||
"""Force update of network status of a simgle transaction
|
||||
|
||||
@ -645,13 +669,19 @@ def sync_tx(self, tx_hash_hex, chain_str):
|
||||
queue = self.request.delivery_info['routing_key']
|
||||
|
||||
chain_spec = ChainSpec.from_chain_str(chain_str)
|
||||
c = RpcClient(chain_spec)
|
||||
#c = RpcClient(chain_spec)
|
||||
|
||||
#tx = c.w3.eth.getTransaction(tx_hash_hex)
|
||||
conn = RPCConnection.connect()
|
||||
o = transaction(tx_hash_hex)
|
||||
tx = conn.do(o)
|
||||
|
||||
tx = c.w3.eth.getTransaction(tx_hash_hex)
|
||||
rcpt = None
|
||||
try:
|
||||
rcpt = c.w3.eth.getTransactionReceipt(tx_hash_hex)
|
||||
except web3.exceptions.TransactionNotFound as e:
|
||||
o = receipt(tx_hash_hex)
|
||||
rcpt = conn.do(o)
|
||||
#rcpt = c.w3.eth.getTransactionReceipt(tx_hash_hex)
|
||||
except NotFoundEthException as e: #web3.exceptions.TransactionNotFound as e:
|
||||
pass
|
||||
|
||||
if rcpt != None:
|
||||
|
@ -125,7 +125,7 @@ else:
|
||||
})
|
||||
|
||||
# set up signer
|
||||
RPCConnection.register_location('signer', config.get('SIGNER_SOCKET_PATH'))
|
||||
RPCConnection.register_location(config.get('SIGNER_SOCKET_PATH'), 'signer')
|
||||
|
||||
# set up web3py
|
||||
re_websocket = re.compile('^wss?://')
|
||||
|
@ -1,47 +1,13 @@
|
||||
# standard imports
|
||||
import os
|
||||
import logging
|
||||
import sys
|
||||
|
||||
# third-party imports
|
||||
import pytest
|
||||
from cic_registry import CICRegistry
|
||||
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
root_dir = os.path.dirname(script_dir)
|
||||
sys.path.insert(0, root_dir)
|
||||
data_dir = os.path.join(script_dir, 'testdata', 'abi')
|
||||
CICRegistry.add_path(data_dir)
|
||||
|
||||
# fixtures
|
||||
from tests.fixtures_registry import *
|
||||
from cic_registry.pytest import *
|
||||
from cic_bancor.pytest import *
|
||||
from tests.fixtures_config import *
|
||||
from tests.fixtures_chainlib import *
|
||||
from tests.fixtures_celery import *
|
||||
from tests.fixtures_web3 import *
|
||||
from tests.fixtures_database import *
|
||||
from tests.fixtures_faucet import *
|
||||
from tests.fixtures_transferapproval import *
|
||||
from tests.fixtures_account import *
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def init_registry(
|
||||
init_w3_conn,
|
||||
):
|
||||
return CICRegistry
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def eth_empty_accounts(
|
||||
init_wallet_extension,
|
||||
):
|
||||
a = []
|
||||
for i in range(10):
|
||||
address = init_wallet_extension.new_account()
|
||||
a.append(address)
|
||||
logg.info('added address {}'.format(a))
|
||||
return a
|
||||
from tests.fixtures_registry import *
|
||||
|
@ -1,30 +0,0 @@
|
||||
# standard imports
|
||||
import logging
|
||||
|
||||
# third-party imports
|
||||
import pytest
|
||||
from eth_accounts_index import AccountRegistry
|
||||
from cic_registry import CICRegistry
|
||||
|
||||
logg = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def accounts_registry(
|
||||
default_chain_spec,
|
||||
cic_registry,
|
||||
w3,
|
||||
):
|
||||
abi = AccountRegistry.abi()
|
||||
constructor = w3.eth.contract(abi=abi, bytecode=AccountRegistry.bytecode())
|
||||
tx_hash = constructor.constructor().transact()
|
||||
r = w3.eth.getTransactionReceipt(tx_hash)
|
||||
logg.debug('accounts registry deployed {}'.format(r.contractAddress))
|
||||
account_registry = AccountRegistry(w3, r.contractAddress)
|
||||
|
||||
c = w3.eth.contract(abi=abi, address=r.contractAddress)
|
||||
c.functions.addWriter(w3.eth.accounts[0]).transact()
|
||||
|
||||
CICRegistry.add_contract(default_chain_spec, c, 'AccountRegistry')
|
||||
|
||||
return account_registry
|
@ -1,234 +0,0 @@
|
||||
# standard imports
|
||||
import os
|
||||
import logging
|
||||
import json
|
||||
|
||||
# third-party imports
|
||||
import pytest
|
||||
from cic_registry.bancor import contract_ids
|
||||
from cic_registry import bancor
|
||||
|
||||
# local imports
|
||||
from cic_eth.eth import rpc
|
||||
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
root_dir = os.path.dirname(script_dir)
|
||||
|
||||
logg = logging.getLogger(__file__)
|
||||
|
||||
|
||||
class BancorContractLoader:
|
||||
|
||||
bancor_path = os.path.join(root_dir, 'bancor')
|
||||
registry_contract = None
|
||||
|
||||
@staticmethod
|
||||
def build_path():
|
||||
return BancorContractLoader.bancor_path
|
||||
# return os.path.join(BancorContractLoader.bancor_path, 'solidity', 'build', 'contracts')
|
||||
|
||||
|
||||
@staticmethod
|
||||
def contract(w3, bundle_id, registry_id=None):
|
||||
if registry_id == None:
|
||||
registry_id = bundle_id
|
||||
contract_id_hex = w3.toHex(text=registry_id)
|
||||
contract_address = BancorContractLoader.registry_contract.functions.addressOf(contract_id_hex).call()
|
||||
contract_build_file = os.path.join(
|
||||
BancorContractLoader.build_path(),
|
||||
'{}.json'.format(bundle_id),
|
||||
)
|
||||
f = open(os.path.join(contract_build_file))
|
||||
j = json.load(f)
|
||||
f.close()
|
||||
contract_abi = j['abi']
|
||||
logg.debug('creating contract interface {} ({}) at address {}'.format(registry_id, bundle_id, contract_address))
|
||||
contract = w3.eth.contract(abi=contract_abi, address=contract_address)
|
||||
return contract
|
||||
|
||||
|
||||
|
||||
# TODO: DRY
|
||||
@pytest.fixture(scope='session')
|
||||
def bancor_deploy(
|
||||
load_config,
|
||||
init_w3_conn,
|
||||
):
|
||||
bancor_dir_default = os.path.join(root_dir, 'bancor')
|
||||
logg.debug('bancor deploy "{}"'.format(bancor_dir_default))
|
||||
BancorContractLoader.bancor_path = load_config.get('BANCOR_DIR', bancor_dir_default)
|
||||
bancor_build_dir = BancorContractLoader.build_path()
|
||||
|
||||
# deploy registry
|
||||
registry_build_file = os.path.join(bancor_build_dir, 'ContractRegistry.json')
|
||||
f = open(os.path.join(registry_build_file))
|
||||
j = json.load(f)
|
||||
f.close()
|
||||
registry_constructor = init_w3_conn.eth.contract(abi=j['abi'], bytecode=j['bytecode'])
|
||||
tx = registry_constructor.constructor().transact()
|
||||
rcpt = init_w3_conn.eth.getTransactionReceipt(tx)
|
||||
registry_address = rcpt['contractAddress']
|
||||
registry_contract = init_w3_conn.eth.contract(abi=j['abi'], address=registry_address)
|
||||
BancorContractLoader.registry_contract = registry_contract
|
||||
|
||||
# deply reserve token
|
||||
reservetoken_build_file = os.path.join(bancor_build_dir, 'EtherToken.json')
|
||||
f = open(os.path.join(reservetoken_build_file))
|
||||
j = json.load(f)
|
||||
f.close()
|
||||
reservetoken_constructor = init_w3_conn.eth.contract(abi=j['abi'], bytecode=j['bytecode'])
|
||||
tx = reservetoken_constructor.constructor('Reserve', 'RSV').transact()
|
||||
rcpt = init_w3_conn.eth.getTransactionReceipt(tx)
|
||||
reservetoken_address = rcpt['contractAddress']
|
||||
reservetoken_contract = init_w3_conn.eth.contract(abi=j['abi'], address=reservetoken_address)
|
||||
|
||||
# register reserve token as bancor hub token
|
||||
key_hex = init_w3_conn.toHex(text='BNTToken')
|
||||
registry_contract.functions.registerAddress(key_hex, reservetoken_address).transact()
|
||||
|
||||
# deposit balances for minting liquid tokens with reserve
|
||||
init_w3_conn.eth.sendTransaction({
|
||||
'from': init_w3_conn.eth.accounts[1],
|
||||
'to': reservetoken_address,
|
||||
'value': init_w3_conn.toWei('101', 'ether'),
|
||||
'nonce': 0,
|
||||
})
|
||||
init_w3_conn.eth.sendTransaction({
|
||||
'from': init_w3_conn.eth.accounts[2],
|
||||
'to': reservetoken_address,
|
||||
'value': init_w3_conn.toWei('101', 'ether'),
|
||||
'nonce': 0,
|
||||
})
|
||||
|
||||
# deploy converter factory contract for creating liquid token exchanges
|
||||
build_file = os.path.join(bancor_build_dir, 'LiquidTokenConverterFactory.json')
|
||||
f = open(build_file)
|
||||
j = json.load(f)
|
||||
f.close()
|
||||
converterfactory_constructor = init_w3_conn.eth.contract(abi=j['abi'], bytecode=j['bytecode'])
|
||||
tx = converterfactory_constructor.constructor().transact()
|
||||
rcpt = init_w3_conn.eth.getTransactionReceipt(tx)
|
||||
converter_factory_address = rcpt['contractAddress']
|
||||
|
||||
# deploy the remaining contracts managed by the registry
|
||||
for k in contract_ids.keys():
|
||||
build_file = os.path.join(bancor_build_dir, '{}.json'.format(k))
|
||||
f = open(build_file)
|
||||
j = json.load(f)
|
||||
f.close()
|
||||
contract_constructor = init_w3_conn.eth.contract(abi=j['abi'], bytecode=j['bytecode'])
|
||||
tx = None
|
||||
|
||||
# include the registry address as constructor parameters for the contracts that require it
|
||||
if k in ['ConverterRegistry', 'ConverterRegistryData', 'BancorNetwork', 'ConversionPathFinder']:
|
||||
tx = contract_constructor.constructor(registry_address).transact()
|
||||
else:
|
||||
tx = contract_constructor.constructor().transact()
|
||||
rcpt = init_w3_conn.eth.getTransactionReceipt(tx)
|
||||
contract_address = rcpt['contractAddress']
|
||||
|
||||
# register contract in registry
|
||||
key_hex = init_w3_conn.toHex(text=contract_ids[k])
|
||||
registry_contract.functions.registerAddress(key_hex, contract_address).transact()
|
||||
contract = init_w3_conn.eth.contract(abi=j['abi'], address=contract_address)
|
||||
|
||||
# bancor formula needs to be initialized before use
|
||||
if k == 'BancorFormula':
|
||||
logg.debug('init bancor formula {}'.format(contract_address))
|
||||
contract.functions.init().transact()
|
||||
|
||||
# converter factory needs liquid token converter factory to be able to issue our liquid tokens
|
||||
if k == 'ConverterFactory':
|
||||
logg.debug('register converter factory {}'.format(converter_factory_address))
|
||||
contract.functions.registerTypedConverterFactory(converter_factory_address).transact()
|
||||
|
||||
logg.info('deployed registry at address {}'.format(registry_address))
|
||||
return registry_contract
|
||||
|
||||
|
||||
|
||||
def __create_converter(w3, converterregistry_contract, reserve_address, owner_address, token_name, token_symbol):
|
||||
converterregistry_contract.functions.newConverter(
|
||||
0,
|
||||
token_name,
|
||||
token_symbol,
|
||||
18,
|
||||
100000,
|
||||
[reserve_address],
|
||||
[250000],
|
||||
).transact({
|
||||
'from': owner_address,
|
||||
})
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def tokens_to_deploy(
|
||||
):
|
||||
return [
|
||||
(1, 'Bert Token', 'BRT'), # account_index, token name, token symbol
|
||||
(2, 'Ernie Token', 'RNI'),
|
||||
]
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def bancor_tokens(
|
||||
init_w3_conn,
|
||||
bancor_deploy,
|
||||
tokens_to_deploy,
|
||||
):
|
||||
|
||||
registry_contract = bancor_deploy
|
||||
|
||||
reserve_contract = BancorContractLoader.contract(init_w3_conn, 'ERC20Token', 'BNTToken')
|
||||
reserve_address = reserve_contract.address
|
||||
|
||||
network_id = init_w3_conn.toHex(text='BancorNetwork')
|
||||
network_address = registry_contract.functions.addressOf(network_id).call()
|
||||
|
||||
converterregistry_contract = BancorContractLoader.contract(init_w3_conn, 'ConverterRegistry', 'BancorConverterRegistry')
|
||||
|
||||
for p in tokens_to_deploy:
|
||||
__create_converter(init_w3_conn, converterregistry_contract, reserve_address, init_w3_conn.eth.accounts[p[0]], p[1], p[2])
|
||||
|
||||
tokens = converterregistry_contract.functions.getAnchors().call()
|
||||
|
||||
network_contract = BancorContractLoader.contract(init_w3_conn, 'BancorNetwork')
|
||||
|
||||
mint_amount = init_w3_conn.toWei('100', 'ether')
|
||||
i = 0
|
||||
for token in tokens:
|
||||
i += 1
|
||||
owner = init_w3_conn.eth.accounts[i]
|
||||
logg.debug('owner {} is {}'.format(owner, token))
|
||||
reserve_contract.functions.approve(network_address, 0).transact({
|
||||
'from': owner
|
||||
})
|
||||
reserve_contract.functions.approve(network_address, mint_amount).transact({
|
||||
'from': owner
|
||||
})
|
||||
logg.debug('convert {} {} {} {}'.format(reserve_address, token, mint_amount, owner))
|
||||
network_contract.functions.convert([
|
||||
reserve_address,
|
||||
token,
|
||||
token,
|
||||
],
|
||||
mint_amount,
|
||||
mint_amount,
|
||||
).transact({
|
||||
'from': owner,
|
||||
})
|
||||
|
||||
return tokens
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def bancor_load(
|
||||
load_config,
|
||||
init_w3_conn,
|
||||
bancor_deploy,
|
||||
bancor_tokens,
|
||||
):
|
||||
registry_address = bancor_deploy.address
|
||||
bancor_dir_default = os.path.join(root_dir, 'bancor')
|
||||
bancor_dir = load_config.get('BANCOR_DIR', bancor_dir_default)
|
||||
bancor.load(init_w3_conn, registry_address, bancor_dir)
|
@ -1,74 +0,0 @@
|
||||
# third-party imports
|
||||
import pytest
|
||||
from cic_registry.pytest import *
|
||||
from erc20_single_shot_faucet import Faucet
|
||||
from cic_registry import zero_address
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def faucet_amount():
|
||||
return 50
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def faucet(
|
||||
faucet_amount,
|
||||
config,
|
||||
default_chain_spec,
|
||||
cic_registry,
|
||||
bancor_tokens,
|
||||
w3_account_roles,
|
||||
w3_account_token_owners,
|
||||
solidity_abis,
|
||||
w3,
|
||||
#accounts_registry,
|
||||
):
|
||||
|
||||
|
||||
abi = Faucet.abi('storage')
|
||||
bytecode = Faucet.bytecode('storage')
|
||||
|
||||
cs = w3.eth.contract(abi=abi, bytecode=bytecode)
|
||||
tx_hash = cs.constructor().transact({'from': w3_account_roles['eth_account_faucet_owner']})
|
||||
rcpt = w3.eth.getTransactionReceipt(tx_hash)
|
||||
cs_address = rcpt.contractAddress
|
||||
|
||||
abi = Faucet.abi()
|
||||
bytecode = Faucet.bytecode()
|
||||
cf = w3.eth.contract(abi=abi, bytecode=bytecode)
|
||||
|
||||
tx_hash = cf.constructor(
|
||||
[
|
||||
w3_account_roles['eth_account_faucet_owner']
|
||||
],
|
||||
bancor_tokens[0],
|
||||
cs_address,
|
||||
zero_address,
|
||||
#accounts_registry,
|
||||
).transact({
|
||||
'from': w3_account_roles['eth_account_faucet_owner']
|
||||
}
|
||||
)
|
||||
|
||||
rcpt = w3.eth.getTransactionReceipt(tx_hash)
|
||||
cf_address = rcpt.contractAddress
|
||||
|
||||
c = w3.eth.contract(abi=abi, address=cf_address)
|
||||
c.functions.setAmount(50).transact({
|
||||
'from': w3_account_roles['eth_account_faucet_owner']
|
||||
}
|
||||
)
|
||||
|
||||
logg.debug('foo {} bar {}'.format(cf_address, w3_account_roles))
|
||||
|
||||
# fund the faucet with token balance
|
||||
token = w3.eth.contract(abi=solidity_abis['ERC20'], address=bancor_tokens[0])
|
||||
token_symbol = token.functions.symbol().call()
|
||||
tx_hash = token.functions.transfer(cf_address, 100000).transact({
|
||||
'from': w3_account_token_owners[token_symbol],
|
||||
})
|
||||
|
||||
CICRegistry.add_contract(default_chain_spec, c, 'Faucet')
|
||||
|
||||
return cf_address
|
||||
|
@ -1,52 +0,0 @@
|
||||
# standard imports
|
||||
import os
|
||||
import json
|
||||
import logging
|
||||
|
||||
# third-party imports
|
||||
import pytest
|
||||
from cic_eth.eth.rpc import RpcClient
|
||||
from crypto_dev_signer.keystore import ReferenceKeystore
|
||||
#from crypto_dev_signer.eth.web3ext import Web3 as Web3ext
|
||||
|
||||
logg = logging.getLogger(__file__)
|
||||
|
||||
|
||||
# TODO: need mock for deterministic signatures
|
||||
# depends on mock blockchain (ganache) where private key is passed directly to this module
|
||||
@pytest.fixture(scope='session')
|
||||
def init_mock_keystore(
|
||||
):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def init_keystore(
|
||||
load_config,
|
||||
database_engine,
|
||||
):
|
||||
#symkey_hex = os.environ.get('CIC_SIGNER_SECRET')
|
||||
symkey_hex = load_config.get('SIGNER_SECRET')
|
||||
symkey = bytes.fromhex(symkey_hex)
|
||||
opt = {
|
||||
'symmetric_key': symkey,
|
||||
}
|
||||
k = ReferenceKeystore(database_engine, **opt)
|
||||
k.db_session.execute('DELETE from ethereum')
|
||||
k.db_session.commit()
|
||||
keys_file = load_config.get('SIGNER_DEV_KEYS_PATH')
|
||||
addresses = []
|
||||
if keys_file:
|
||||
logg.debug('loading keys from {}'.format(keys_file))
|
||||
f = open(keys_file, 'r')
|
||||
j = json.load(f)
|
||||
f.close()
|
||||
signer_password = load_config.get('SIGNER_PASSWORD')
|
||||
for pk in j['private']:
|
||||
address_hex = k.import_raw_key(bytes.fromhex(pk[2:]), signer_password)
|
||||
addresses.append(address_hex)
|
||||
|
||||
RpcClient.set_provider_address(addresses[0])
|
||||
return addresses
|
||||
|
||||
|
@ -1,50 +1,7 @@
|
||||
# standard imports
|
||||
import os
|
||||
import json
|
||||
import logging
|
||||
|
||||
# third-party imports
|
||||
# external imports
|
||||
import pytest
|
||||
from eth_address_declarator import AddressDeclarator
|
||||
|
||||
# local imports
|
||||
from cic_registry import CICRegistry
|
||||
from cic_registry import to_identifier
|
||||
from cic_registry.contract import Contract
|
||||
from cic_registry.error import ChainExistsError
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
script_dir = os.path.dirname(__file__)
|
||||
|
||||
from chainlib.chain import ChainSpec
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def local_cic_registry(
|
||||
cic_registry,
|
||||
):
|
||||
path = os.path.realpath(os.path.join(script_dir, 'testdata', 'abi'))
|
||||
CICRegistry.add_path(path)
|
||||
return cic_registry
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def address_declarator(
|
||||
bloxberg_config,
|
||||
default_chain_spec,
|
||||
default_chain_registry,
|
||||
local_cic_registry,
|
||||
init_rpc,
|
||||
init_w3,
|
||||
):
|
||||
|
||||
c = init_rpc.w3.eth.contract(abi=AddressDeclarator.abi(), bytecode=AddressDeclarator.bytecode())
|
||||
default_description = '0x{:<064s}'.format(b'test'.hex())
|
||||
logg.debug('default_ {}'.format(default_description))
|
||||
tx_hash = c.constructor(default_description).transact()
|
||||
rcpt = init_rpc.w3.eth.getTransactionReceipt(tx_hash)
|
||||
|
||||
registry = init_rpc.w3.eth.contract(abi=CICRegistry.abi(), address=local_cic_registry)
|
||||
chain_identifier = to_identifier(default_chain_registry.chain())
|
||||
registry.functions.set(to_identifier('AddressDeclarator'), rcpt.contractAddress, chain_identifier, bloxberg_config['digest']).transact()
|
||||
|
||||
return rcpt.contractAddress
|
||||
def default_chain_spec():
|
||||
return ChainSpec('evm', 'bloxberg', 8996)
|
||||
|
@ -1,27 +0,0 @@
|
||||
# third-party imports
|
||||
import pytest
|
||||
from cic_registry import CICRegistry
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def token_registry(
|
||||
default_chain_spec,
|
||||
cic_registry,
|
||||
solidity_abis,
|
||||
evm_bytecodes,
|
||||
w3,
|
||||
):
|
||||
|
||||
abi = solidity_abis['TokenRegistry']
|
||||
bytecode = evm_bytecodes['TokenRegistry']
|
||||
|
||||
c = w3.eth.contract(abi=abi, bytecode=bytecode)
|
||||
tx_hash = c.constructor().transact({'from': w3.eth.accounts[0]})
|
||||
rcpt = w3.eth.getTransactionReceipt(tx_hash)
|
||||
address = rcpt.contractAddress
|
||||
|
||||
c = w3.eth.contract(abi=abi, address=address)
|
||||
|
||||
CICRegistry.add_contract(default_chain_spec, c, 'TokenRegistry')
|
||||
|
||||
return address
|
@ -1,30 +0,0 @@
|
||||
# third-party imports
|
||||
import pytest
|
||||
from cic_registry.pytest import *
|
||||
from erc20_approval_escrow import TransferApproval
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def transfer_approval(
|
||||
config,
|
||||
default_chain_spec,
|
||||
default_chain_registry,
|
||||
bancor_tokens,
|
||||
w3_account_roles,
|
||||
cic_registry,
|
||||
w3,
|
||||
):
|
||||
|
||||
abi = TransferApproval.abi()
|
||||
bytecode = TransferApproval.bytecode()
|
||||
|
||||
c = w3.eth.contract(abi=abi, bytecode=bytecode)
|
||||
approvers = [w3_account_roles['eth_account_approval_owner']]
|
||||
tx_hash = c.constructor(approvers).transact({'from': w3_account_roles['eth_account_approval_owner']})
|
||||
rcpt = w3.eth.getTransactionReceipt(tx_hash)
|
||||
|
||||
c = w3.eth.contract(abi=abi, address=rcpt.contractAddress)
|
||||
|
||||
CICRegistry.add_contract(default_chain_spec, c, 'TransferApproval')
|
||||
|
||||
return rcpt.contractAddress
|
@ -1,212 +0,0 @@
|
||||
# standard imports
|
||||
import os
|
||||
import logging
|
||||
|
||||
# third-party imports
|
||||
import hexbytes
|
||||
import pytest
|
||||
import web3
|
||||
import eth_tester
|
||||
from crypto_dev_signer.eth.transaction import EIP155Transaction
|
||||
from crypto_dev_signer.eth.signer.defaultsigner import ReferenceSigner as EIP155Signer
|
||||
from eth_keys import KeyAPI
|
||||
|
||||
# local imports
|
||||
from cic_eth.eth import RpcClient
|
||||
from cic_eth.eth.rpc import GasOracle
|
||||
from cic_eth.db.models.role import AccountRole
|
||||
from cic_eth.db.models.nonce import Nonce
|
||||
|
||||
#logg = logging.getLogger(__name__)
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def init_w3_nokey(
|
||||
):
|
||||
provider = 'http://localhost:8545'
|
||||
return web3.Web3(provider)
|
||||
|
||||
|
||||
class ProviderWalletExtension:
|
||||
|
||||
def __init__(self, provider, gas_price=1000000):
|
||||
self.provider = provider
|
||||
self.signer = EIP155Signer(provider)
|
||||
self.default_gas_price = gas_price
|
||||
|
||||
|
||||
def get(self, address, password=None):
|
||||
return self.provider.get(address, password)
|
||||
|
||||
|
||||
def new_account(self, password=None):
|
||||
keys = KeyAPI()
|
||||
pk = os.urandom(32)
|
||||
account = self.provider.add_account(pk.hex())
|
||||
self.provider.accounts[account] = keys.PrivateKey(pk)
|
||||
return account
|
||||
|
||||
|
||||
def sign_transaction(self, tx):
|
||||
tx['chainId'] = int(tx['chainId'])
|
||||
logg.debug('signing {}'.format(tx))
|
||||
signer_tx = EIP155Transaction(tx, tx['nonce'], tx['chainId'])
|
||||
tx_signed = self.signer.signTransaction(signer_tx)
|
||||
tx_signed_dict = signer_tx.serialize()
|
||||
tx_signed_dict['raw'] = '0x' + signer_tx.rlp_serialize().hex()
|
||||
return tx_signed_dict
|
||||
|
||||
|
||||
def sign(self, address, text=None, bytes=None):
|
||||
logg.debug('sign message {} {}'.format(address[2:], text))
|
||||
return self.signer.signEthereumMessage(address[2:], text)
|
||||
|
||||
|
||||
def send_raw_transaction(self, rlp_tx_hex):
|
||||
raw_tx = self.provider.backend.send_raw_transaction(bytes.fromhex(rlp_tx_hex[2:]))
|
||||
return raw_tx
|
||||
|
||||
|
||||
def gas_price(self):
|
||||
return self.default_gas_price
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def init_wallet_extension(
|
||||
init_eth_tester,
|
||||
eth_provider,
|
||||
):
|
||||
|
||||
x = ProviderWalletExtension(init_eth_tester)
|
||||
|
||||
def _rpcclient_web3_constructor():
|
||||
w3 = web3.Web3(eth_provider)
|
||||
setattr(w3.eth, 'personal', x)
|
||||
setattr(w3.eth, 'sign_transaction', x.sign_transaction)
|
||||
setattr(w3.eth, 'send_raw_transaction', x.send_raw_transaction)
|
||||
setattr(w3.eth, 'sign', x.sign)
|
||||
setattr(w3.eth, 'gas_price', x.gas_price)
|
||||
return (init_eth_tester, w3)
|
||||
|
||||
RpcClient.set_constructor(_rpcclient_web3_constructor)
|
||||
init_eth_tester.signer = EIP155Signer(x)
|
||||
return x
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def init_w3_conn(
|
||||
default_chain_spec,
|
||||
init_eth_tester,
|
||||
init_wallet_extension,
|
||||
):
|
||||
|
||||
c = RpcClient(default_chain_spec)
|
||||
x = ProviderWalletExtension(init_eth_tester)
|
||||
|
||||
# a hack to make available missing rpc calls we need
|
||||
setattr(c.w3.eth, 'personal', x)
|
||||
setattr(c.w3.eth, 'sign_transaction', x.sign_transaction)
|
||||
setattr(c.w3.eth, 'send_raw_transaction', x.send_raw_transaction)
|
||||
setattr(c.w3.eth, 'sign', x.sign)
|
||||
return c.w3
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def init_w3(
|
||||
init_database,
|
||||
init_eth_tester,
|
||||
init_eth_account_roles,
|
||||
init_w3_conn,
|
||||
):
|
||||
|
||||
for address in init_w3_conn.eth.accounts:
|
||||
nonce = init_w3_conn.eth.getTransactionCount(address, 'pending')
|
||||
Nonce.init(address, nonce=nonce, session=init_database)
|
||||
init_database.commit()
|
||||
|
||||
yield init_w3_conn
|
||||
logg.debug('mining om nom nom... {}'.format(init_eth_tester.mine_block()))
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def init_eth_account_roles(
|
||||
init_database,
|
||||
w3_account_roles,
|
||||
):
|
||||
|
||||
address = w3_account_roles.get('eth_account_gas_provider')
|
||||
role = AccountRole.set('GAS_GIFTER', address)
|
||||
init_database.add(role)
|
||||
|
||||
return w3_account_roles
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def init_rpc(
|
||||
default_chain_spec,
|
||||
init_eth_account_roles,
|
||||
init_eth_tester,
|
||||
init_wallet_extension,
|
||||
):
|
||||
|
||||
c = RpcClient(default_chain_spec)
|
||||
x = ProviderWalletExtension(init_eth_tester)
|
||||
|
||||
# a hack to make available missing rpc calls we need
|
||||
setattr(c.w3.eth, 'personal', x)
|
||||
setattr(c.w3.eth, 'sign_transaction', x.sign_transaction)
|
||||
setattr(c.w3.eth, 'send_raw_transaction', x.send_raw_transaction)
|
||||
setattr(c.w3.eth, 'sign', x.sign)
|
||||
yield c
|
||||
logg.debug('mining om nom nom... {}'.format(init_eth_tester.mine_block()))
|
||||
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def w3_account_roles(
|
||||
config,
|
||||
w3,
|
||||
):
|
||||
|
||||
role_ids = [
|
||||
'eth_account_bancor_deployer',
|
||||
'eth_account_reserve_owner',
|
||||
'eth_account_reserve_minter',
|
||||
'eth_account_accounts_index_owner',
|
||||
'eth_account_accounts_index_writer',
|
||||
'eth_account_sarafu_owner',
|
||||
'eth_account_sarafu_gifter',
|
||||
'eth_account_approval_owner',
|
||||
'eth_account_faucet_owner',
|
||||
'eth_account_gas_provider',
|
||||
]
|
||||
roles = {}
|
||||
|
||||
i = 0
|
||||
for r in role_ids:
|
||||
a = w3.eth.accounts[i]
|
||||
try:
|
||||
a = config.get(r.upper())
|
||||
except KeyError:
|
||||
pass
|
||||
roles[r] = a
|
||||
i += 1
|
||||
|
||||
return roles
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def w3_account_token_owners(
|
||||
tokens_to_deploy,
|
||||
w3,
|
||||
):
|
||||
|
||||
token_owners = {}
|
||||
|
||||
i = 1
|
||||
for t in tokens_to_deploy:
|
||||
token_owners[t[2]] = w3.eth.accounts[i]
|
||||
i += 1
|
||||
|
||||
return token_owners
|
@ -1,246 +0,0 @@
|
||||
# standard imports
|
||||
import os
|
||||
import logging
|
||||
|
||||
# third-party imports
|
||||
import celery
|
||||
import pytest
|
||||
import web3
|
||||
|
||||
# local imports
|
||||
from cic_eth.api import AdminApi
|
||||
from cic_eth.db.models.role import AccountRole
|
||||
from cic_eth.db.models.otx import Otx
|
||||
from cic_eth.db.models.tx import TxCache
|
||||
from cic_eth.db.enum import (
|
||||
StatusEnum,
|
||||
StatusBits,
|
||||
status_str,
|
||||
)
|
||||
from cic_eth.error import InitializationError
|
||||
from cic_eth.eth.task import sign_and_register_tx
|
||||
from cic_eth.eth.tx import cache_gas_refill_data
|
||||
from cic_eth.eth.util import unpack_signed_raw_tx
|
||||
from cic_eth.eth.rpc import RpcClient
|
||||
from cic_eth.eth.task import sign_tx
|
||||
from cic_eth.eth.tx import otx_cache_parse_tx
|
||||
from cic_eth.queue.tx import create as queue_create
|
||||
from cic_eth.queue.tx import get_tx
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
def test_resend_inplace(
|
||||
default_chain_spec,
|
||||
init_database,
|
||||
init_w3,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
chain_str = str(default_chain_spec)
|
||||
c = RpcClient(default_chain_spec)
|
||||
|
||||
sigs = []
|
||||
|
||||
gas_provider = c.gas_provider()
|
||||
|
||||
s_nonce = celery.signature(
|
||||
'cic_eth.eth.tx.reserve_nonce',
|
||||
[
|
||||
init_w3.eth.accounts[0],
|
||||
gas_provider,
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_refill = celery.signature(
|
||||
'cic_eth.eth.tx.refill_gas',
|
||||
[
|
||||
chain_str,
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_nonce.link(s_refill)
|
||||
t = s_nonce.apply_async()
|
||||
t.get()
|
||||
for r in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
q = init_database.query(Otx)
|
||||
q = q.join(TxCache)
|
||||
q = q.filter(TxCache.recipient==init_w3.eth.accounts[0])
|
||||
o = q.first()
|
||||
tx_raw = o.signed_tx
|
||||
|
||||
tx_dict = unpack_signed_raw_tx(bytes.fromhex(tx_raw[2:]), default_chain_spec.chain_id())
|
||||
gas_price_before = tx_dict['gasPrice']
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.lock_send',
|
||||
[
|
||||
chain_str,
|
||||
init_w3.eth.accounts[0],
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
t = s.apply_async()
|
||||
t.get()
|
||||
assert t.successful()
|
||||
|
||||
api = AdminApi(c, queue=None)
|
||||
t = api.resend(tx_dict['hash'], chain_str, unlock=True)
|
||||
t.get()
|
||||
i = 0
|
||||
tx_hash_new_hex = None
|
||||
for r in t.collect():
|
||||
tx_hash_new_hex = r[1]
|
||||
assert t.successful()
|
||||
|
||||
tx_raw_new = get_tx(tx_hash_new_hex)
|
||||
logg.debug('get {}'.format(tx_raw_new))
|
||||
tx_dict_new = unpack_signed_raw_tx(bytes.fromhex(tx_raw_new['signed_tx'][2:]), default_chain_spec.chain_id())
|
||||
assert tx_hash_new_hex != tx_dict['hash']
|
||||
assert tx_dict_new['gasPrice'] > gas_price_before
|
||||
|
||||
tx_dict_after = get_tx(tx_dict['hash'])
|
||||
|
||||
logg.debug('logggg {}'.format(status_str(tx_dict_after['status'])))
|
||||
assert tx_dict_after['status'] & StatusBits.MANUAL
|
||||
|
||||
|
||||
#def test_check_fix_nonce(
|
||||
# default_chain_spec,
|
||||
# init_database,
|
||||
# init_eth_account_roles,
|
||||
# init_w3,
|
||||
# eth_empty_accounts,
|
||||
# celery_session_worker,
|
||||
# ):
|
||||
#
|
||||
# chain_str = str(default_chain_spec)
|
||||
#
|
||||
# sigs = []
|
||||
# for i in range(5):
|
||||
# s = celery.signature(
|
||||
# 'cic_eth.eth.tx.refill_gas',
|
||||
# [
|
||||
# eth_empty_accounts[i],
|
||||
# chain_str,
|
||||
# ],
|
||||
# queue=None,
|
||||
# )
|
||||
# sigs.append(s)
|
||||
#
|
||||
# t = celery.group(sigs)()
|
||||
# txs = t.get()
|
||||
# assert t.successful()
|
||||
#
|
||||
# tx_hash = web3.Web3.keccak(hexstr=txs[2])
|
||||
# c = RpcClient(default_chain_spec)
|
||||
# api = AdminApi(c, queue=None)
|
||||
# address = init_eth_account_roles['eth_account_gas_provider']
|
||||
# nonce_spec = api.check_nonce(address)
|
||||
# assert nonce_spec['nonce']['network'] == 0
|
||||
# assert nonce_spec['nonce']['queue'] == 4
|
||||
# assert nonce_spec['nonce']['blocking'] == None
|
||||
#
|
||||
# s_set = celery.signature(
|
||||
# 'cic_eth.queue.tx.set_rejected',
|
||||
# [
|
||||
# tx_hash.hex(),
|
||||
# ],
|
||||
# queue=None,
|
||||
# )
|
||||
# t = s_set.apply_async()
|
||||
# t.get()
|
||||
# t.collect()
|
||||
# assert t.successful()
|
||||
#
|
||||
#
|
||||
# nonce_spec = api.check_nonce(address)
|
||||
# assert nonce_spec['nonce']['blocking'] == 2
|
||||
# assert nonce_spec['tx']['blocking'] == tx_hash.hex()
|
||||
#
|
||||
# t = api.fix_nonce(address, nonce_spec['nonce']['blocking'])
|
||||
# t.get()
|
||||
# t.collect()
|
||||
# assert t.successful()
|
||||
#
|
||||
# for tx in txs[3:]:
|
||||
# tx_hash = web3.Web3.keccak(hexstr=tx)
|
||||
# tx_dict = get_tx(tx_hash.hex())
|
||||
# assert tx_dict['status'] == StatusEnum.OVERRIDDEN
|
||||
#
|
||||
#
|
||||
#def test_tag_account(
|
||||
# init_database,
|
||||
# eth_empty_accounts,
|
||||
# init_rpc,
|
||||
# ):
|
||||
#
|
||||
# api = AdminApi(init_rpc)
|
||||
#
|
||||
# api.tag_account('foo', eth_empty_accounts[0])
|
||||
# api.tag_account('bar', eth_empty_accounts[1])
|
||||
# api.tag_account('bar', eth_empty_accounts[2])
|
||||
#
|
||||
# assert AccountRole.get_address('foo') == eth_empty_accounts[0]
|
||||
# assert AccountRole.get_address('bar') == eth_empty_accounts[2]
|
||||
#
|
||||
#
|
||||
#def test_ready(
|
||||
# init_database,
|
||||
# eth_empty_accounts,
|
||||
# init_rpc,
|
||||
# w3,
|
||||
# ):
|
||||
#
|
||||
# api = AdminApi(init_rpc)
|
||||
#
|
||||
# with pytest.raises(InitializationError):
|
||||
# api.ready()
|
||||
#
|
||||
# bogus_account = os.urandom(20)
|
||||
# bogus_account_hex = '0x' + bogus_account.hex()
|
||||
#
|
||||
# api.tag_account('ETH_GAS_PROVIDER_ADDRESS', web3.Web3.toChecksumAddress(bogus_account_hex))
|
||||
# with pytest.raises(KeyError):
|
||||
# api.ready()
|
||||
#
|
||||
# api.tag_account('ETH_GAS_PROVIDER_ADDRESS', eth_empty_accounts[0])
|
||||
# api.ready()
|
||||
#
|
||||
#
|
||||
#def test_tx(
|
||||
# default_chain_spec,
|
||||
# cic_registry,
|
||||
# init_database,
|
||||
# init_rpc,
|
||||
# init_w3,
|
||||
# celery_session_worker,
|
||||
# ):
|
||||
#
|
||||
# tx = {
|
||||
# 'from': init_w3.eth.accounts[0],
|
||||
# 'to': init_w3.eth.accounts[1],
|
||||
# 'nonce': 42,
|
||||
# 'gas': 21000,
|
||||
# 'gasPrice': 1000000,
|
||||
# 'value': 128,
|
||||
# 'chainId': default_chain_spec.chain_id(),
|
||||
# 'data': '',
|
||||
# }
|
||||
#
|
||||
# (tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, str(default_chain_spec))
|
||||
# queue_create(
|
||||
# tx['nonce'],
|
||||
# tx['from'],
|
||||
# tx_hash_hex,
|
||||
# tx_signed_raw_hex,
|
||||
# str(default_chain_spec),
|
||||
# )
|
||||
# tx_recovered = unpack_signed_raw_tx(bytes.fromhex(tx_signed_raw_hex[2:]), default_chain_spec.chain_id())
|
||||
# cache_gas_refill_data(tx_hash_hex, tx_recovered)
|
||||
#
|
||||
# api = AdminApi(init_rpc, queue=None)
|
||||
# tx = api.tx(default_chain_spec, tx_hash=tx_hash_hex)
|
@ -1,121 +0,0 @@
|
||||
# standard imports
|
||||
import os
|
||||
import logging
|
||||
import time
|
||||
|
||||
# third-party imports
|
||||
import pytest
|
||||
import celery
|
||||
from cic_registry import CICRegistry
|
||||
|
||||
# platform imports
|
||||
from cic_eth.api import Api
|
||||
from cic_eth.eth.factory import TxFactory
|
||||
|
||||
logg = logging.getLogger(__name__)
|
||||
|
||||
def test_account_api(
|
||||
default_chain_spec,
|
||||
init_w3,
|
||||
init_database,
|
||||
init_eth_account_roles,
|
||||
celery_session_worker,
|
||||
):
|
||||
api = Api(str(default_chain_spec), callback_param='accounts', callback_task='cic_eth.callbacks.noop.noop', queue=None)
|
||||
t = api.create_account('', register=False)
|
||||
t.get()
|
||||
for r in t.collect():
|
||||
print(r)
|
||||
assert t.successful()
|
||||
|
||||
|
||||
def test_transfer_api(
|
||||
default_chain_spec,
|
||||
init_w3,
|
||||
cic_registry,
|
||||
init_database,
|
||||
bancor_registry,
|
||||
bancor_tokens,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
token = CICRegistry.get_address(default_chain_spec, bancor_tokens[0])
|
||||
|
||||
api = Api(str(default_chain_spec), callback_param='transfer', callback_task='cic_eth.callbacks.noop.noop', queue=None)
|
||||
t = api.transfer(init_w3.eth.accounts[2], init_w3.eth.accounts[4], 111, token.symbol())
|
||||
t.get()
|
||||
for r in t.collect():
|
||||
print(r)
|
||||
assert t.successful()
|
||||
|
||||
|
||||
@pytest.mark.skip()
|
||||
def test_convert_api(
|
||||
default_chain_spec,
|
||||
init_w3,
|
||||
cic_registry,
|
||||
init_database,
|
||||
bancor_registry,
|
||||
bancor_tokens,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
token_alice = CICRegistry.get_address(default_chain_spec, bancor_tokens[0])
|
||||
token_bob = CICRegistry.get_address(default_chain_spec, bancor_tokens[1])
|
||||
|
||||
api = Api(str(default_chain_spec), callback_param='convert', callback_task='cic_eth.callbacks.noop.noop', queue=None)
|
||||
t = api.convert(init_w3.eth.accounts[2], 110, 100, token_alice.symbol(), token_bob.symbol())
|
||||
for r in t.collect():
|
||||
print(r)
|
||||
assert t.successful()
|
||||
|
||||
|
||||
@pytest.mark.skip()
|
||||
def test_convert_transfer_api(
|
||||
default_chain_spec,
|
||||
init_w3,
|
||||
cic_registry,
|
||||
init_database,
|
||||
bancor_registry,
|
||||
bancor_tokens,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
token_alice = CICRegistry.get_address(default_chain_spec, bancor_tokens[0])
|
||||
token_bob = CICRegistry.get_address(default_chain_spec, bancor_tokens[1])
|
||||
|
||||
api = Api(str(default_chain_spec), callback_param='convert_transfer', callback_task='cic_eth.callbacks.noop.noop', queue=None)
|
||||
t = api.convert_transfer(init_w3.eth.accounts[2], init_w3.eth.accounts[4], 110, 100, token_alice.symbol(), token_bob.symbol())
|
||||
t.get()
|
||||
for r in t.collect():
|
||||
print(r)
|
||||
assert t.successful()
|
||||
|
||||
|
||||
def test_refill_gas(
|
||||
default_chain_spec,
|
||||
cic_registry,
|
||||
init_database,
|
||||
init_w3,
|
||||
celery_session_worker,
|
||||
eth_empty_accounts,
|
||||
):
|
||||
|
||||
api = Api(str(default_chain_spec), callback_param='convert_transfer', callback_task='cic_eth.callbacks.noop.noop', queue=None)
|
||||
t = api.refill_gas(eth_empty_accounts[0])
|
||||
t.get()
|
||||
for r in t.collect():
|
||||
print(r)
|
||||
assert t.successful()
|
||||
|
||||
|
||||
def test_ping(
|
||||
default_chain_spec,
|
||||
celery_session_worker,
|
||||
):
|
||||
api = Api(str(default_chain_spec), callback_param='ping', callback_task='cic_eth.callbacks.noop.noop', queue=None)
|
||||
t = api.ping('pong')
|
||||
t.get()
|
||||
for r in t.collect():
|
||||
print(r)
|
||||
assert t.successful()
|
@ -1,40 +0,0 @@
|
||||
# standard imports
|
||||
import os
|
||||
import logging
|
||||
|
||||
# local imports
|
||||
import web3
|
||||
from cic_eth.api.api_task import Api
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
def test_balance_complex_api(
|
||||
default_chain_spec,
|
||||
init_database,
|
||||
init_w3,
|
||||
cic_registry,
|
||||
dummy_token,
|
||||
dummy_token_registered,
|
||||
celery_session_worker,
|
||||
init_eth_tester,
|
||||
):
|
||||
|
||||
chain_str = str(default_chain_spec)
|
||||
|
||||
api = Api(chain_str, queue=None, callback_param='foo')
|
||||
|
||||
a = web3.Web3.toChecksumAddress('0x' + os.urandom(20).hex())
|
||||
t = api.balance(a, 'DUM')
|
||||
t.get()
|
||||
r = None
|
||||
for c in t.collect():
|
||||
r = c[1]
|
||||
assert t.successful()
|
||||
logg.debug(r)
|
||||
|
||||
assert r[0].get('balance_incoming') != None
|
||||
assert r[0].get('balance_outgoing') != None
|
||||
assert r[0].get('balance_network') != None
|
||||
|
||||
logg.debug('r {}'.format(r))
|
@ -1,115 +0,0 @@
|
||||
# standard imports
|
||||
import logging
|
||||
|
||||
# local imports
|
||||
from cic_eth.api.api_task import Api
|
||||
from cic_eth.eth.token import TokenTxFactory
|
||||
from cic_eth.eth.task import sign_tx
|
||||
from tests.mock.filter import (
|
||||
block_filter,
|
||||
tx_filter,
|
||||
)
|
||||
from cic_eth.db.models.nonce import (
|
||||
Nonce,
|
||||
NonceReservation,
|
||||
)
|
||||
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
def test_list_tx(
|
||||
default_chain_spec,
|
||||
default_chain_registry,
|
||||
init_database,
|
||||
init_rpc,
|
||||
init_w3,
|
||||
init_eth_tester,
|
||||
dummy_token_gifted,
|
||||
cic_registry,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
tx_hashes = []
|
||||
# external tx
|
||||
nonce = init_w3.eth.getTransactionCount(init_w3.eth.accounts[0])
|
||||
q = init_database.query(Nonce)
|
||||
q = q.filter(Nonce.address_hex==init_w3.eth.accounts[0])
|
||||
o = q.first()
|
||||
o.nonce = nonce
|
||||
init_database.add(o)
|
||||
init_database.commit()
|
||||
|
||||
NonceReservation.next(init_w3.eth.accounts[0], 'foo', session=init_database)
|
||||
init_database.commit()
|
||||
|
||||
init_eth_tester.mine_blocks(13)
|
||||
txf = TokenTxFactory(init_w3.eth.accounts[0], init_rpc)
|
||||
tx = txf.transfer(dummy_token_gifted, init_w3.eth.accounts[1], 3000, default_chain_spec, 'foo')
|
||||
(tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, str(default_chain_spec))
|
||||
tx_hashes.append(tx_hash_hex)
|
||||
init_w3.eth.sendRawTransaction(tx_signed_raw_hex)
|
||||
# add to filter
|
||||
rcpt = init_w3.eth.getTransactionReceipt(tx_hash_hex)
|
||||
a = rcpt['blockNumber']
|
||||
block_filter.add(a.to_bytes(4, 'big'))
|
||||
a = rcpt['blockNumber'] + rcpt['transactionIndex']
|
||||
tx_filter.add(a.to_bytes(4, 'big'))
|
||||
|
||||
# external tx
|
||||
NonceReservation.next(init_w3.eth.accounts[0], 'bar', session=init_database)
|
||||
init_database.commit()
|
||||
|
||||
init_eth_tester.mine_blocks(28)
|
||||
txf = TokenTxFactory(init_w3.eth.accounts[0], init_rpc)
|
||||
tx = txf.transfer(dummy_token_gifted, init_w3.eth.accounts[1], 4000, default_chain_spec, 'bar')
|
||||
(tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, str(default_chain_spec))
|
||||
tx_hashes.append(tx_hash_hex)
|
||||
init_w3.eth.sendRawTransaction(tx_signed_raw_hex)
|
||||
# add to filter
|
||||
rcpt = init_w3.eth.getTransactionReceipt(tx_hash_hex)
|
||||
a = rcpt['blockNumber']
|
||||
block_filter.add(a.to_bytes(4, 'big'))
|
||||
a = rcpt['blockNumber'] + rcpt['transactionIndex']
|
||||
tx_filter.add(a.to_bytes(4, 'big'))
|
||||
|
||||
# custodial tx
|
||||
#NonceReservation.next(init_w3.eth.accounts[0], 'blinky', session=init_database)
|
||||
#init_database.commit()
|
||||
|
||||
init_eth_tester.mine_blocks(3)
|
||||
#txf = TokenTxFactory(init_w3.eth.accounts[0], init_rpc)
|
||||
api = Api(str(default_chain_spec), queue=None)
|
||||
t = api.transfer(init_w3.eth.accounts[0], init_w3.eth.accounts[1], 1000, 'DUM') #, 'blinky')
|
||||
t.get()
|
||||
tx_hash_hex = None
|
||||
for c in t.collect():
|
||||
tx_hash_hex = c[1]
|
||||
assert t.successful()
|
||||
tx_hashes.append(tx_hash_hex)
|
||||
|
||||
# custodial tx
|
||||
#NonceReservation.next(init_w3.eth.accounts[0], 'clyde', session=init_database)
|
||||
init_database.commit()
|
||||
init_eth_tester.mine_blocks(6)
|
||||
api = Api(str(default_chain_spec), queue=None)
|
||||
t = api.transfer(init_w3.eth.accounts[0], init_w3.eth.accounts[1], 2000, 'DUM') #, 'clyde')
|
||||
t.get()
|
||||
tx_hash_hex = None
|
||||
for c in t.collect():
|
||||
tx_hash_hex = c[1]
|
||||
assert t.successful()
|
||||
tx_hashes.append(tx_hash_hex)
|
||||
|
||||
# test the api
|
||||
t = api.list(init_w3.eth.accounts[1], external_task='tests.mock.filter.filter')
|
||||
r = t.get()
|
||||
for c in t.collect():
|
||||
r = c[1]
|
||||
assert t.successful()
|
||||
|
||||
assert len(r) == 4
|
||||
for tx in r:
|
||||
logg.debug('have tx {}'.format(r))
|
||||
tx_hashes.remove(tx['hash'])
|
||||
assert len(tx_hashes) == 0
|
@ -1,140 +0,0 @@
|
||||
# standard imports
|
||||
import os
|
||||
import logging
|
||||
import time
|
||||
|
||||
# third-party imports
|
||||
import pytest
|
||||
import web3
|
||||
import celery
|
||||
|
||||
# local imports
|
||||
from cic_eth.error import OutOfGasError
|
||||
from cic_eth.db.models.otx import Otx
|
||||
from cic_eth.db.models.base import SessionBase
|
||||
from cic_eth.db.enum import StatusEnum
|
||||
from cic_eth.db.enum import StatusEnum
|
||||
from cic_eth.db.models.nonce import Nonce
|
||||
from cic_eth.db.models.role import AccountRole
|
||||
from cic_eth.eth.account import AccountTxFactory
|
||||
|
||||
logg = logging.getLogger() #__name__)
|
||||
logging.getLogger('fuuck').setLevel(logging.DEBUG)
|
||||
|
||||
|
||||
def test_create_account(
|
||||
default_chain_spec,
|
||||
init_w3,
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
caplog,
|
||||
):
|
||||
caplog.set_level(logging.DEBUG, 'cic_eth.task')
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.account.create',
|
||||
[
|
||||
'foo',
|
||||
str(default_chain_spec),
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
logg.debug('got account {}'.format(r))
|
||||
|
||||
session = SessionBase.create_session()
|
||||
q = session.query(Nonce).filter(Nonce.address_hex==r)
|
||||
o = q.first()
|
||||
session.close()
|
||||
assert o != None
|
||||
assert o.nonce == 0
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.account.have',
|
||||
[
|
||||
r,
|
||||
str(default_chain_spec),
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
assert r == t.get()
|
||||
print('caplog records {}'.format(caplog.records))
|
||||
|
||||
|
||||
def test_register_account(
|
||||
default_chain_spec,
|
||||
accounts_registry,
|
||||
init_database,
|
||||
init_eth_tester,
|
||||
init_w3,
|
||||
init_rpc,
|
||||
cic_registry,
|
||||
celery_session_worker,
|
||||
eth_empty_accounts,
|
||||
):
|
||||
|
||||
logg.debug('chainspec {}'.format(str(default_chain_spec)))
|
||||
|
||||
s_nonce = celery.signature(
|
||||
'cic_eth.eth.tx.reserve_nonce',
|
||||
[
|
||||
eth_empty_accounts[0],
|
||||
init_w3.eth.accounts[0],
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_register = celery.signature(
|
||||
'cic_eth.eth.account.register',
|
||||
[
|
||||
str(default_chain_spec),
|
||||
init_w3.eth.accounts[0],
|
||||
],
|
||||
)
|
||||
s_nonce.link(s_register)
|
||||
t = s_nonce.apply_async()
|
||||
address = t.get()
|
||||
for r in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
session = SessionBase.create_session()
|
||||
o = session.query(Otx).first()
|
||||
tx_signed_hex = o.signed_tx
|
||||
session.close()
|
||||
|
||||
s_send = celery.signature(
|
||||
'cic_eth.eth.tx.send',
|
||||
[
|
||||
[tx_signed_hex],
|
||||
str(default_chain_spec),
|
||||
],
|
||||
)
|
||||
t = s_send.apply_async()
|
||||
address = t.get()
|
||||
r = t.collect()
|
||||
t.successful()
|
||||
|
||||
init_eth_tester.mine_block()
|
||||
|
||||
assert accounts_registry.have(eth_empty_accounts[0])
|
||||
|
||||
|
||||
def test_role_task(
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
default_chain_spec,
|
||||
):
|
||||
|
||||
address = '0x' + os.urandom(20).hex()
|
||||
role = AccountRole.set('foo', address)
|
||||
init_database.add(role)
|
||||
init_database.commit()
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.account.role',
|
||||
[
|
||||
address,
|
||||
str(default_chain_spec),
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
assert r == 'foo'
|
@ -1,253 +0,0 @@
|
||||
# standard imports
|
||||
import logging
|
||||
|
||||
# third-party imports
|
||||
from cic_registry import CICRegistry
|
||||
import celery
|
||||
|
||||
# local imports
|
||||
from cic_eth.eth.rpc import RpcClient
|
||||
from cic_eth.db.models.otx import Otx
|
||||
from cic_eth.db.models.nonce import Nonce
|
||||
from cic_eth.eth.util import unpack_signed_raw_tx
|
||||
|
||||
#logg = logging.getLogger(__name__)
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
def test_balance_complex(
|
||||
default_chain_spec,
|
||||
init_database,
|
||||
init_w3,
|
||||
cic_registry,
|
||||
dummy_token_gifted,
|
||||
celery_session_worker,
|
||||
init_eth_tester,
|
||||
):
|
||||
|
||||
chain_str = str(default_chain_spec)
|
||||
token_data = {
|
||||
'address': dummy_token_gifted,
|
||||
'converters': [],
|
||||
}
|
||||
|
||||
tx_hashes = []
|
||||
|
||||
# TODO: Temporary workaround for nonce db cache initialization being made before deployments.
|
||||
# Instead use different accounts than system ones for transfers for tests
|
||||
nonce = init_w3.eth.getTransactionCount(init_w3.eth.accounts[0])
|
||||
q = init_database.query(Nonce)
|
||||
q = q.filter(Nonce.address_hex==init_w3.eth.accounts[0])
|
||||
o = q.first()
|
||||
o.nonce = nonce
|
||||
init_database.add(o)
|
||||
init_database.commit()
|
||||
|
||||
for i in range(3):
|
||||
s_nonce = celery.signature(
|
||||
'cic_eth.eth.tx.reserve_nonce',
|
||||
[
|
||||
[token_data],
|
||||
init_w3.eth.accounts[0],
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_transfer = celery.signature(
|
||||
'cic_eth.eth.token.transfer',
|
||||
[
|
||||
init_w3.eth.accounts[0],
|
||||
init_w3.eth.accounts[1],
|
||||
1000*(i+1),
|
||||
chain_str,
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_nonce.link(s_transfer)
|
||||
t = s_nonce.apply_async()
|
||||
t.get()
|
||||
r = None
|
||||
for c in t.collect():
|
||||
r = c[1]
|
||||
assert t.successful()
|
||||
tx_hashes.append(r)
|
||||
|
||||
otx = Otx.load(r)
|
||||
|
||||
s_send = celery.signature(
|
||||
'cic_eth.eth.tx.send',
|
||||
[
|
||||
[otx.signed_tx],
|
||||
chain_str,
|
||||
],
|
||||
)
|
||||
t = s_send.apply_async()
|
||||
t.get()
|
||||
for r in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
init_eth_tester.mine_block()
|
||||
|
||||
|
||||
# here insert block sync to get state of balance
|
||||
|
||||
s_balance_base = celery.signature(
|
||||
'cic_eth.eth.token.balance',
|
||||
[
|
||||
[token_data],
|
||||
init_w3.eth.accounts[0],
|
||||
chain_str,
|
||||
],
|
||||
)
|
||||
|
||||
s_balance_out = celery.signature(
|
||||
'cic_eth.queue.balance.balance_outgoing',
|
||||
[
|
||||
init_w3.eth.accounts[0],
|
||||
chain_str,
|
||||
]
|
||||
)
|
||||
|
||||
s_balance_in = celery.signature(
|
||||
'cic_eth.queue.balance.balance_incoming',
|
||||
[
|
||||
init_w3.eth.accounts[0],
|
||||
chain_str,
|
||||
]
|
||||
)
|
||||
s_balance_out.link(s_balance_in)
|
||||
s_balance_base.link(s_balance_out)
|
||||
t = s_balance_base.apply_async()
|
||||
t.get()
|
||||
r = None
|
||||
for c in t.collect():
|
||||
r = c[1]
|
||||
assert t.successful()
|
||||
|
||||
assert r[0]['balance_network'] > 0
|
||||
assert r[0]['balance_incoming'] == 0
|
||||
assert r[0]['balance_outgoing'] > 0
|
||||
|
||||
s_balance_base = celery.signature(
|
||||
'cic_eth.eth.token.balance',
|
||||
[
|
||||
init_w3.eth.accounts[1],
|
||||
chain_str,
|
||||
],
|
||||
)
|
||||
|
||||
s_balance_out = celery.signature(
|
||||
'cic_eth.queue.balance.balance_outgoing',
|
||||
[
|
||||
[token_data],
|
||||
init_w3.eth.accounts[1],
|
||||
chain_str,
|
||||
]
|
||||
)
|
||||
|
||||
s_balance_in = celery.signature(
|
||||
'cic_eth.queue.balance.balance_incoming',
|
||||
[
|
||||
init_w3.eth.accounts[1],
|
||||
chain_str,
|
||||
]
|
||||
)
|
||||
|
||||
s_balance_base.link(s_balance_in)
|
||||
s_balance_out.link(s_balance_base)
|
||||
t = s_balance_out.apply_async()
|
||||
t.get()
|
||||
r = None
|
||||
for c in t.collect():
|
||||
r = c[1]
|
||||
assert t.successful()
|
||||
|
||||
assert r[0]['balance_network'] > 0
|
||||
assert r[0]['balance_incoming'] > 0
|
||||
assert r[0]['balance_outgoing'] == 0
|
||||
|
||||
# Set confirmed status in backend
|
||||
for tx_hash in tx_hashes:
|
||||
rcpt = init_w3.eth.getTransactionReceipt(tx_hash)
|
||||
assert rcpt['status'] == 1
|
||||
otx = Otx.load(tx_hash, session=init_database)
|
||||
otx.success(block=rcpt['blockNumber'], session=init_database)
|
||||
init_database.add(otx)
|
||||
init_database.commit()
|
||||
|
||||
|
||||
s_balance_base = celery.signature(
|
||||
'cic_eth.eth.token.balance',
|
||||
[
|
||||
init_w3.eth.accounts[1],
|
||||
chain_str,
|
||||
],
|
||||
)
|
||||
|
||||
s_balance_out = celery.signature(
|
||||
'cic_eth.queue.balance.balance_outgoing',
|
||||
[
|
||||
[token_data],
|
||||
init_w3.eth.accounts[1],
|
||||
chain_str,
|
||||
]
|
||||
)
|
||||
|
||||
s_balance_in = celery.signature(
|
||||
'cic_eth.queue.balance.balance_incoming',
|
||||
[
|
||||
init_w3.eth.accounts[1],
|
||||
chain_str,
|
||||
]
|
||||
)
|
||||
|
||||
s_balance_base.link(s_balance_in)
|
||||
s_balance_out.link(s_balance_base)
|
||||
t = s_balance_out.apply_async()
|
||||
t.get()
|
||||
r = None
|
||||
for c in t.collect():
|
||||
r = c[1]
|
||||
assert t.successful()
|
||||
assert r[0]['balance_network'] > 0
|
||||
assert r[0]['balance_incoming'] == 0
|
||||
assert r[0]['balance_outgoing'] == 0
|
||||
|
||||
|
||||
s_balance_base = celery.signature(
|
||||
'cic_eth.eth.token.balance',
|
||||
[
|
||||
init_w3.eth.accounts[0],
|
||||
chain_str,
|
||||
],
|
||||
)
|
||||
|
||||
s_balance_out = celery.signature(
|
||||
'cic_eth.queue.balance.balance_outgoing',
|
||||
[
|
||||
[token_data],
|
||||
init_w3.eth.accounts[0],
|
||||
chain_str,
|
||||
]
|
||||
)
|
||||
|
||||
s_balance_in = celery.signature(
|
||||
'cic_eth.queue.balance.balance_incoming',
|
||||
[
|
||||
init_w3.eth.accounts[0],
|
||||
chain_str,
|
||||
]
|
||||
)
|
||||
|
||||
s_balance_base.link(s_balance_in)
|
||||
s_balance_out.link(s_balance_base)
|
||||
t = s_balance_out.apply_async()
|
||||
t.get()
|
||||
r = None
|
||||
for c in t.collect():
|
||||
r = c[1]
|
||||
assert t.successful()
|
||||
assert r[0]['balance_network'] > 0
|
||||
assert r[0]['balance_incoming'] == 0
|
||||
assert r[0]['balance_outgoing'] == 0
|
||||
|
||||
|
@ -1,50 +0,0 @@
|
||||
# standard imports
|
||||
import logging
|
||||
import os
|
||||
|
||||
# external imports
|
||||
import pytest
|
||||
import celery
|
||||
|
||||
# local imports
|
||||
from cic_eth.db import TxConvertTransfer
|
||||
from cic_eth.eth.bancor import BancorTxFactory
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
@pytest.mark.skip()
|
||||
def test_transfer_after_convert(
|
||||
init_w3,
|
||||
init_database,
|
||||
cic_registry,
|
||||
bancor_tokens,
|
||||
bancor_registry,
|
||||
default_chain_spec,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
tx_hash = os.urandom(32).hex()
|
||||
txct = TxConvertTransfer(tx_hash, init_w3.eth.accounts[1], default_chain_spec)
|
||||
init_database.add(txct)
|
||||
init_database.commit()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.bancor.transfer_converted',
|
||||
[
|
||||
[
|
||||
{
|
||||
'address': bancor_tokens[0],
|
||||
},
|
||||
],
|
||||
init_w3.eth.accounts[0],
|
||||
init_w3.eth.accounts[1],
|
||||
1024,
|
||||
tx_hash,
|
||||
str(default_chain_spec),
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
t.get()
|
||||
t.collect()
|
||||
assert t.successful()
|
@ -1,29 +0,0 @@
|
||||
# external imports
|
||||
import celery
|
||||
|
||||
# local imports
|
||||
from cic_eth.db.models.debug import Debug
|
||||
|
||||
|
||||
def test_debug_alert(
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.debug.alert',
|
||||
[
|
||||
'foo',
|
||||
'bar',
|
||||
'baz',
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
assert r == 'foo'
|
||||
|
||||
q = init_database.query(Debug)
|
||||
q = q.filter(Debug.tag=='bar')
|
||||
o = q.first()
|
||||
assert o.description == 'baz'
|
@ -1,81 +0,0 @@
|
||||
# standard imports
|
||||
import os
|
||||
import json
|
||||
import logging
|
||||
|
||||
# third-party imports
|
||||
import celery
|
||||
|
||||
# local imports
|
||||
from cic_eth.eth.account import unpack_gift
|
||||
from cic_eth.eth.factory import TxFactory
|
||||
from cic_eth.eth.util import unpack_signed_raw_tx
|
||||
from cic_eth.db.models.nonce import Nonce
|
||||
from cic_eth.db.models.otx import Otx
|
||||
from cic_eth.db.models.tx import TxCache
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
script_dir = os.path.dirname(__file__)
|
||||
|
||||
|
||||
def test_faucet(
|
||||
default_chain_spec,
|
||||
faucet_amount,
|
||||
faucet,
|
||||
eth_empty_accounts,
|
||||
bancor_tokens,
|
||||
w3_account_roles,
|
||||
w3_account_token_owners,
|
||||
init_w3,
|
||||
solidity_abis,
|
||||
init_eth_tester,
|
||||
cic_registry,
|
||||
celery_session_worker,
|
||||
init_database,
|
||||
):
|
||||
|
||||
s_nonce = celery.signature(
|
||||
'cic_eth.eth.tx.reserve_nonce',
|
||||
[
|
||||
init_w3.eth.accounts[7],
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_gift = celery.signature(
|
||||
'cic_eth.eth.account.gift',
|
||||
[
|
||||
str(default_chain_spec),
|
||||
],
|
||||
)
|
||||
s_send = celery.signature(
|
||||
'cic_eth.eth.tx.send',
|
||||
[
|
||||
str(default_chain_spec),
|
||||
],
|
||||
)
|
||||
s_gift.link(s_send)
|
||||
s_nonce.link(s_gift)
|
||||
t = s_nonce.apply_async()
|
||||
t.get()
|
||||
for r in t.collect():
|
||||
logg.debug('result {}'.format(r))
|
||||
assert t.successful()
|
||||
|
||||
q = init_database.query(Otx)
|
||||
q = q.join(TxCache)
|
||||
q = q.filter(TxCache.sender==init_w3.eth.accounts[7])
|
||||
o = q.first()
|
||||
signed_tx = o.signed_tx
|
||||
|
||||
tx = unpack_signed_raw_tx(bytes.fromhex(signed_tx[2:]), default_chain_spec.chain_id())
|
||||
giveto = unpack_gift(tx['data'])
|
||||
assert giveto['to'] == init_w3.eth.accounts[7]
|
||||
|
||||
init_eth_tester.mine_block()
|
||||
|
||||
token = init_w3.eth.contract(abi=solidity_abis['ERC20'], address=bancor_tokens[0])
|
||||
|
||||
balance = token.functions.balanceOf(init_w3.eth.accounts[7]).call()
|
||||
|
||||
assert balance == faucet_amount
|
@ -1,346 +0,0 @@
|
||||
# standard imports
|
||||
import logging
|
||||
import time
|
||||
|
||||
# third-party imports
|
||||
import pytest
|
||||
import celery
|
||||
from web3.exceptions import ValidationError
|
||||
|
||||
# local imports
|
||||
from cic_eth.db.enum import StatusEnum
|
||||
from cic_eth.db.models.otx import Otx
|
||||
from cic_eth.db.models.tx import TxCache
|
||||
from cic_eth.db.models.base import SessionBase
|
||||
from cic_eth.eth.task import sign_and_register_tx
|
||||
from cic_eth.eth.task import sign_tx
|
||||
from cic_eth.eth.token import TokenTxFactory
|
||||
from cic_eth.eth.token import TxFactory
|
||||
from cic_eth.eth.token import cache_transfer_data
|
||||
from cic_eth.eth.rpc import RpcClient
|
||||
from cic_eth.queue.tx import create as queue_create
|
||||
from cic_eth.error import OutOfGasError
|
||||
from cic_eth.db.models.role import AccountRole
|
||||
from cic_eth.error import AlreadyFillingGasError
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
def test_refill_gas(
|
||||
default_chain_spec,
|
||||
init_eth_tester,
|
||||
init_rpc,
|
||||
init_w3,
|
||||
init_database,
|
||||
cic_registry,
|
||||
init_eth_account_roles,
|
||||
celery_session_worker,
|
||||
eth_empty_accounts,
|
||||
):
|
||||
|
||||
provider_address = AccountRole.get_address('GAS_GIFTER', init_database)
|
||||
receiver_address = eth_empty_accounts[0]
|
||||
|
||||
c = init_rpc
|
||||
refill_amount = c.refill_amount()
|
||||
|
||||
balance = init_rpc.w3.eth.getBalance(receiver_address)
|
||||
s_nonce = celery.signature(
|
||||
'cic_eth.eth.tx.reserve_nonce',
|
||||
[
|
||||
eth_empty_accounts[0],
|
||||
provider_address,
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_refill = celery.signature(
|
||||
'cic_eth.eth.tx.refill_gas',
|
||||
[
|
||||
str(default_chain_spec),
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
|
||||
s_nonce.link(s_refill)
|
||||
t = s_nonce.apply_async()
|
||||
r = t.get()
|
||||
for c in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
q = init_database.query(Otx)
|
||||
q = q.join(TxCache)
|
||||
q = q.filter(TxCache.recipient==receiver_address)
|
||||
o = q.first()
|
||||
signed_tx = o.signed_tx
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.tx.send',
|
||||
[
|
||||
[signed_tx],
|
||||
str(default_chain_spec),
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
t.collect()
|
||||
assert t.successful()
|
||||
|
||||
init_eth_tester.mine_block()
|
||||
balance_new = init_rpc.w3.eth.getBalance(receiver_address)
|
||||
assert balance_new == (balance + refill_amount)
|
||||
|
||||
# Verify that entry is added in TxCache
|
||||
q = init_database.query(Otx)
|
||||
q = q.join(TxCache)
|
||||
q = q.filter(TxCache.recipient==receiver_address)
|
||||
r = q.first()
|
||||
init_database.commit()
|
||||
|
||||
assert r.status == StatusEnum.SENT
|
||||
|
||||
|
||||
def test_refill_deduplication(
|
||||
default_chain_spec,
|
||||
init_rpc,
|
||||
init_w3,
|
||||
init_database,
|
||||
init_eth_account_roles,
|
||||
cic_registry,
|
||||
celery_session_worker,
|
||||
eth_empty_accounts,
|
||||
):
|
||||
|
||||
provider_address = AccountRole.get_address('ETH_GAS_PROVIDER_ADDRESS', init_database)
|
||||
receiver_address = eth_empty_accounts[0]
|
||||
|
||||
c = init_rpc
|
||||
refill_amount = c.refill_amount()
|
||||
|
||||
s_nonce = celery.signature(
|
||||
'cic_eth.eth.tx.reserve_nonce',
|
||||
[
|
||||
receiver_address,
|
||||
provider_address,
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_refill = celery.signature(
|
||||
'cic_eth.eth.tx.refill_gas',
|
||||
[
|
||||
str(default_chain_spec),
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
|
||||
s_nonce.link(s_refill)
|
||||
t = s_nonce.apply_async()
|
||||
r = t.get()
|
||||
for e in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
s_nonce = celery.signature(
|
||||
'cic_eth.eth.tx.reserve_nonce',
|
||||
[
|
||||
receiver_address,
|
||||
provider_address,
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_refill = celery.signature(
|
||||
'cic_eth.eth.tx.refill_gas',
|
||||
[
|
||||
str(default_chain_spec),
|
||||
],
|
||||
)
|
||||
|
||||
s_nonce.link(s_refill)
|
||||
t = s_nonce.apply_async()
|
||||
#with pytest.raises(AlreadyFillingGasError):
|
||||
t.get()
|
||||
for e in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
logg.warning('TODO: complete test by checking that second tx had zero value')
|
||||
|
||||
|
||||
# TODO: check gas is part of the transfer chain, and we cannot create the transfer nonce by uuid before the task. Test is subsumed by transfer task test, but should be tested in isolation
|
||||
#def test_check_gas(
|
||||
# default_chain_spec,
|
||||
# init_eth_tester,
|
||||
# init_w3,
|
||||
# init_rpc,
|
||||
# eth_empty_accounts,
|
||||
# init_database,
|
||||
# cic_registry,
|
||||
# celery_session_worker,
|
||||
# bancor_registry,
|
||||
# bancor_tokens,
|
||||
# ):
|
||||
#
|
||||
# provider_address = init_w3.eth.accounts[0]
|
||||
# gas_receiver_address = eth_empty_accounts[0]
|
||||
# token_receiver_address = init_w3.eth.accounts[1]
|
||||
#
|
||||
## c = init_rpc
|
||||
## txf = TokenTxFactory(gas_receiver_address, c)
|
||||
## tx_transfer = txf.transfer(bancor_tokens[0], token_receiver_address, 42, default_chain_spec, 'foo')
|
||||
##
|
||||
## (tx_hash_hex, tx_signed_raw_hex) = sign_and_register_tx(tx_transfer, str(default_chain_spec), None)
|
||||
#
|
||||
# token_data = [
|
||||
# {
|
||||
# 'address': bancor_tokens[0],
|
||||
# },
|
||||
# ]
|
||||
#
|
||||
# s_nonce = celery.signature(
|
||||
# 'cic_eth.eth.tx.reserve_nonce',
|
||||
# [
|
||||
# token_data,
|
||||
# init_w3.eth.accounts[0],
|
||||
# ],
|
||||
# queue=None,
|
||||
# )
|
||||
# s_transfer = celery.signature(
|
||||
# 'cic_eth.eth.token.transfer',
|
||||
# [
|
||||
# init_w3.eth.accounts[0],
|
||||
# init_w3.eth.accounts[1],
|
||||
# 1024,
|
||||
# str(default_chain_spec),
|
||||
# ],
|
||||
# queue=None,
|
||||
# )
|
||||
#
|
||||
# gas_price = c.gas_price()
|
||||
# gas_limit = tx_transfer['gas']
|
||||
#
|
||||
# s = celery.signature(
|
||||
# 'cic_eth.eth.tx.check_gas',
|
||||
# [
|
||||
# [tx_hash_hex],
|
||||
# str(default_chain_spec),
|
||||
# [],
|
||||
# gas_receiver_address,
|
||||
# gas_limit * gas_price,
|
||||
# ],
|
||||
# )
|
||||
# s_nonce.link(s_transfer)
|
||||
# t = s_nonce.apply_async()
|
||||
# with pytest.raises(OutOfGasError):
|
||||
# r = t.get()
|
||||
# #assert len(r) == 0
|
||||
#
|
||||
# time.sleep(1)
|
||||
# t.collect()
|
||||
#
|
||||
# session = SessionBase.create_session()
|
||||
# q = session.query(Otx)
|
||||
# q = q.filter(Otx.tx_hash==tx_hash_hex)
|
||||
# r = q.first()
|
||||
# session.close()
|
||||
# assert r.status == StatusEnum.WAITFORGAS
|
||||
|
||||
|
||||
def test_resend_with_higher_gas(
|
||||
default_chain_spec,
|
||||
init_eth_tester,
|
||||
init_w3,
|
||||
init_rpc,
|
||||
init_database,
|
||||
cic_registry,
|
||||
celery_session_worker,
|
||||
bancor_registry,
|
||||
bancor_tokens,
|
||||
):
|
||||
|
||||
c = init_rpc
|
||||
|
||||
token_data = {
|
||||
'address': bancor_tokens[0],
|
||||
}
|
||||
|
||||
s_nonce = celery.signature(
|
||||
'cic_eth.eth.tx.reserve_nonce',
|
||||
[
|
||||
[token_data],
|
||||
init_w3.eth.accounts[0],
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_transfer = celery.signature(
|
||||
'cic_eth.eth.token.transfer',
|
||||
[
|
||||
init_w3.eth.accounts[0],
|
||||
init_w3.eth.accounts[1],
|
||||
1024,
|
||||
str(default_chain_spec),
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
|
||||
# txf = TokenTxFactory(init_w3.eth.accounts[0], c)
|
||||
|
||||
# tx_transfer = txf.transfer(bancor_tokens[0], init_w3.eth.accounts[1], 1024, default_chain_spec, 'foo')
|
||||
# logg.debug('txtransfer {}'.format(tx_transfer))
|
||||
# (tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx_transfer, str(default_chain_spec))
|
||||
# logg.debug('signed raw {}'.format(tx_signed_raw_hex))
|
||||
# queue_create(
|
||||
# tx_transfer['nonce'],
|
||||
# tx_transfer['from'],
|
||||
# tx_hash_hex,
|
||||
# tx_signed_raw_hex,
|
||||
# str(default_chain_spec),
|
||||
# )
|
||||
# logg.debug('create {}'.format(tx_transfer['from']))
|
||||
# cache_transfer_data(
|
||||
# tx_hash_hex,
|
||||
# tx_transfer, #_signed_raw_hex,
|
||||
# )
|
||||
s_nonce.link(s_transfer)
|
||||
t = s_nonce.apply_async()
|
||||
t.get()
|
||||
for r in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
q = init_database.query(Otx)
|
||||
q = q.join(TxCache)
|
||||
q = q.filter(TxCache.recipient==init_w3.eth.accounts[1])
|
||||
o = q.first()
|
||||
tx_hash_hex = o.tx_hash
|
||||
|
||||
s_resend = celery.signature(
|
||||
'cic_eth.eth.tx.resend_with_higher_gas',
|
||||
[
|
||||
tx_hash_hex,
|
||||
str(default_chain_spec),
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
|
||||
t = s_resend.apply_async()
|
||||
for r in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
#
|
||||
#def test_resume(
|
||||
# default_chain_spec,
|
||||
# init_eth_tester,
|
||||
# w3,
|
||||
# w3_account_roles,
|
||||
# init_database,
|
||||
# bancor_tokens,
|
||||
# celery_session_worker,
|
||||
# eth_empty_accounts,
|
||||
# ):
|
||||
#
|
||||
# txf = TokenTxFactory()
|
||||
#
|
||||
# tx_transfer = txf.transfer(bancor_tokens[0], eth_empty_accounts[1], 1024)
|
||||
# (tx_hash_hex, tx_signed_raw_hex) = sign_and_register_tx(tx_transfer)
|
||||
#
|
||||
# resume_tx()
|
@ -1,355 +0,0 @@
|
||||
# standard imports
|
||||
import os
|
||||
|
||||
# third-party imports
|
||||
import celery
|
||||
import pytest
|
||||
|
||||
# local imports
|
||||
from cic_eth.db.models.lock import Lock
|
||||
from cic_eth.db.models.otx import Otx
|
||||
from cic_eth.db.enum import LockEnum
|
||||
from cic_eth.error import LockedError
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'task_postfix,flag_enum',
|
||||
[
|
||||
('send', LockEnum.SEND),
|
||||
('queue', LockEnum.QUEUE),
|
||||
],
|
||||
)
|
||||
def test_lock_task(
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
default_chain_spec,
|
||||
task_postfix,
|
||||
flag_enum,
|
||||
):
|
||||
|
||||
chain_str = str(default_chain_spec)
|
||||
address = '0x' + os.urandom(20).hex()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.lock_{}'.format(task_postfix),
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
address,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
assert t.successful()
|
||||
assert r == 'foo'
|
||||
|
||||
q = init_database.query(Lock)
|
||||
q = q.filter(Lock.address==address)
|
||||
lock = q.first()
|
||||
assert lock != None
|
||||
assert lock.flags == flag_enum
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.unlock_{}'.format(task_postfix),
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
address,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
assert t.successful()
|
||||
assert r == 'foo'
|
||||
|
||||
q = init_database.query(Lock)
|
||||
q = q.filter(Lock.address==address)
|
||||
lock = q.first()
|
||||
assert lock == None
|
||||
|
||||
|
||||
def test_lock_check_task(
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
default_chain_spec,
|
||||
):
|
||||
|
||||
chain_str = str(default_chain_spec)
|
||||
address = '0x' + os.urandom(20).hex()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.lock_send',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
address,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.lock_queue',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
address,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.check_lock',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
LockEnum.SEND,
|
||||
address,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
|
||||
with pytest.raises(LockedError):
|
||||
r = t.get()
|
||||
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.check_lock',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
LockEnum.CREATE,
|
||||
address,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
assert r == 'foo'
|
||||
|
||||
|
||||
def test_lock_arbitrary_task(
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
default_chain_spec,
|
||||
):
|
||||
|
||||
chain_str = str(default_chain_spec)
|
||||
address = '0x' + os.urandom(20).hex()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.lock',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
address,
|
||||
LockEnum.SEND | LockEnum.QUEUE,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
assert r == 'foo'
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.check_lock',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
LockEnum.SEND | LockEnum.QUEUE,
|
||||
address,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
with pytest.raises(LockedError):
|
||||
r = t.get()
|
||||
assert r == 'foo'
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.unlock',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
address,
|
||||
LockEnum.SEND,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
assert r == 'foo'
|
||||
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.check_lock',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
LockEnum.SEND,
|
||||
address,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.unlock',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
address,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
assert r == 'foo'
|
||||
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.check_lock',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
LockEnum.QUEUE,
|
||||
address,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
|
||||
def test_lock_list(
|
||||
default_chain_spec,
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
chain_str = str(default_chain_spec)
|
||||
|
||||
# Empty list of no lock set
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.get_lock',
|
||||
[],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
assert len(r) == 0
|
||||
|
||||
# One element if lock set and no link with otx
|
||||
tx_hash = '0x' + os.urandom(32).hex()
|
||||
address_foo = '0x' + os.urandom(20).hex()
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.lock_send',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
address_foo,
|
||||
tx_hash,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.get_lock',
|
||||
[],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
assert len(r) == 1
|
||||
assert r[0]['tx_hash'] == None
|
||||
assert r[0]['address'] == address_foo
|
||||
assert r[0]['flags'] == LockEnum.SEND
|
||||
|
||||
# One element if lock set and link with otx, tx_hash now available
|
||||
signed_tx = '0x' + os.urandom(128).hex()
|
||||
otx = Otx.add(
|
||||
0,
|
||||
address_foo,
|
||||
tx_hash,
|
||||
signed_tx,
|
||||
)
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.unlock_send',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
address_foo,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.lock_send',
|
||||
[
|
||||
'foo',
|
||||
chain_str,
|
||||
address_foo,
|
||||
tx_hash,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.get_lock',
|
||||
[],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
assert r[0]['tx_hash'] == tx_hash
|
||||
|
||||
|
||||
# Two elements if two locks in place
|
||||
address_bar = '0x' + os.urandom(20).hex()
|
||||
tx_hash = '0x' + os.urandom(32).hex()
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.ctrl.lock_queue',
|
||||
[
|
||||
'bar',
|
||||
chain_str,
|
||||
address_bar,
|
||||
tx_hash,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.get_lock',
|
||||
[],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
assert len(r) == 2
|
||||
|
||||
# One element if filtered by address
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.get_lock',
|
||||
[
|
||||
address_bar,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
assert len(r) == 1
|
||||
assert r[0]['tx_hash'] == None
|
||||
assert r[0]['address'] == address_bar
|
||||
assert r[0]['flags'] == LockEnum.QUEUE
|
||||
|
||||
address_bogus = '0x' + os.urandom(20).hex()
|
||||
# No elements if filtered by non-existent address
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.get_lock',
|
||||
[
|
||||
address_bogus,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
@ -1,136 +0,0 @@
|
||||
# third-party imports
|
||||
import pytest
|
||||
import celery
|
||||
|
||||
# local imports
|
||||
from cic_eth.admin.nonce import shift_nonce
|
||||
from cic_eth.queue.tx import create as queue_create
|
||||
from cic_eth.eth.tx import otx_cache_parse_tx
|
||||
from cic_eth.eth.task import sign_tx
|
||||
from cic_eth.db.models.nonce import (
|
||||
NonceReservation,
|
||||
Nonce
|
||||
)
|
||||
from cic_eth.db.models.otx import Otx
|
||||
from cic_eth.db.models.tx import TxCache
|
||||
|
||||
|
||||
@pytest.mark.skip()
|
||||
def test_reserve_nonce_task(
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
eth_empty_accounts,
|
||||
):
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.tx.reserve_nonce',
|
||||
[
|
||||
'foo',
|
||||
eth_empty_accounts[0],
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
assert r == 'foo'
|
||||
|
||||
q = init_database.query(Nonce)
|
||||
q = q.filter(Nonce.address_hex==eth_empty_accounts[0])
|
||||
o = q.first()
|
||||
assert o != None
|
||||
|
||||
q = init_database.query(NonceReservation)
|
||||
q = q.filter(NonceReservation.key==str(t))
|
||||
o = q.first()
|
||||
assert o != None
|
||||
|
||||
|
||||
def test_reserve_nonce_chain(
|
||||
default_chain_spec,
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
init_w3,
|
||||
init_rpc,
|
||||
):
|
||||
|
||||
provider_address = init_rpc.gas_provider()
|
||||
q = init_database.query(Nonce)
|
||||
q = q.filter(Nonce.address_hex==provider_address)
|
||||
o = q.first()
|
||||
o.nonce = 42
|
||||
init_database.add(o)
|
||||
init_database.commit()
|
||||
|
||||
s_nonce = celery.signature(
|
||||
'cic_eth.eth.tx.reserve_nonce',
|
||||
[
|
||||
init_w3.eth.accounts[0],
|
||||
provider_address,
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_gas = celery.signature(
|
||||
'cic_eth.eth.tx.refill_gas',
|
||||
[
|
||||
str(default_chain_spec),
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_nonce.link(s_gas)
|
||||
t = s_nonce.apply_async()
|
||||
r = t.get()
|
||||
for c in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
q = init_database.query(Otx)
|
||||
Q = q.join(TxCache)
|
||||
q = q.filter(TxCache.recipient==init_w3.eth.accounts[0])
|
||||
o = q.first()
|
||||
|
||||
assert o.nonce == 42
|
||||
|
||||
|
||||
@pytest.mark.skip()
|
||||
def test_shift_nonce(
|
||||
default_chain_spec,
|
||||
init_database,
|
||||
init_w3,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
chain_str = str(default_chain_spec)
|
||||
|
||||
tx_hashes = []
|
||||
for i in range(5):
|
||||
tx = {
|
||||
'from': init_w3.eth.accounts[0],
|
||||
'to': init_w3.eth.accounts[i],
|
||||
'nonce': i,
|
||||
'gas': 21000,
|
||||
'gasPrice': 1000000,
|
||||
'value': 128,
|
||||
'chainId': default_chain_spec.chain_id(),
|
||||
'data': '',
|
||||
}
|
||||
|
||||
(tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, chain_str)
|
||||
queue_create(tx['nonce'], init_w3.eth.accounts[0], tx_hash_hex, tx_signed_raw_hex, chain_str)
|
||||
otx_cache_parse_tx(tx_hash_hex, tx_signed_raw_hex, chain_str)
|
||||
tx_hashes.append(tx_hash_hex)
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.admin.nonce.shift_nonce',
|
||||
[
|
||||
chain_str,
|
||||
tx_hashes[2],
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
for _ in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
@ -1,180 +0,0 @@
|
||||
# standard imports
|
||||
import os
|
||||
import logging
|
||||
|
||||
# third-party imports
|
||||
import pytest
|
||||
import celery
|
||||
from cic_registry import zero_address
|
||||
|
||||
# local imports
|
||||
from cic_eth.db.models.otx import Otx
|
||||
from cic_eth.db.models.tx import TxCache
|
||||
from cic_eth.db.enum import (
|
||||
StatusEnum,
|
||||
StatusBits,
|
||||
)
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
# TODO: Refactor to use test vector decorator
|
||||
def test_status_success(
|
||||
init_w3,
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
tx_hash = '0x' + os.urandom(32).hex()
|
||||
signed_tx = '0x' + os.urandom(128).hex()
|
||||
account = '0x' + os.urandom(20).hex()
|
||||
|
||||
otx = Otx(0, init_w3.eth.accounts[0], tx_hash, signed_tx)
|
||||
init_database.add(otx)
|
||||
init_database.commit()
|
||||
assert otx.status == StatusEnum.PENDING
|
||||
|
||||
txc = TxCache(tx_hash, account, init_w3.eth.accounts[0], zero_address, zero_address, 13, 13)
|
||||
init_database.add(txc)
|
||||
init_database.commit()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.set_sent_status',
|
||||
[tx_hash],
|
||||
)
|
||||
t = s.apply_async()
|
||||
t.get()
|
||||
assert t.successful()
|
||||
init_database.refresh(otx)
|
||||
assert otx.status == StatusEnum.SENT
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.set_final_status',
|
||||
[tx_hash, 13],
|
||||
)
|
||||
t = s.apply_async()
|
||||
t.get()
|
||||
assert t.successful()
|
||||
init_database.refresh(otx)
|
||||
assert otx.status == StatusEnum.SUCCESS
|
||||
|
||||
|
||||
def test_status_tempfail_resend(
|
||||
init_w3,
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
tx_hash = '0x' + os.urandom(32).hex()
|
||||
signed_tx = '0x' + os.urandom(128).hex()
|
||||
account = '0x' + os.urandom(20).hex()
|
||||
|
||||
otx = Otx(0, init_w3.eth.accounts[0], tx_hash, signed_tx)
|
||||
init_database.add(otx)
|
||||
init_database.commit()
|
||||
|
||||
txc = TxCache(tx_hash, account, init_w3.eth.accounts[0], zero_address, zero_address, 13, 13)
|
||||
init_database.add(txc)
|
||||
init_database.commit()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.set_sent_status',
|
||||
[tx_hash, True],
|
||||
)
|
||||
t = s.apply_async()
|
||||
t.get()
|
||||
assert t.successful()
|
||||
init_database.refresh(otx)
|
||||
assert otx.status == StatusEnum.SENDFAIL
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.set_sent_status',
|
||||
[tx_hash],
|
||||
)
|
||||
t = s.apply_async()
|
||||
t.get()
|
||||
assert t.successful()
|
||||
init_database.refresh(otx)
|
||||
assert otx.status == StatusEnum.SENT
|
||||
|
||||
|
||||
|
||||
def test_status_fail(
|
||||
init_w3,
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
tx_hash = '0x' + os.urandom(32).hex()
|
||||
signed_tx = '0x' + os.urandom(128).hex()
|
||||
account = '0x' + os.urandom(20).hex()
|
||||
|
||||
otx = Otx(0, init_w3.eth.accounts[0], tx_hash, signed_tx)
|
||||
init_database.add(otx)
|
||||
init_database.commit()
|
||||
|
||||
txc = TxCache(tx_hash, account, init_w3.eth.accounts[0], zero_address, zero_address, 13, 13)
|
||||
init_database.add(txc)
|
||||
init_database.commit()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.set_sent_status',
|
||||
[tx_hash],
|
||||
)
|
||||
t = s.apply_async()
|
||||
t.get()
|
||||
assert t.successful()
|
||||
init_database.refresh(otx)
|
||||
assert otx.status == StatusEnum.SENT
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.set_final_status',
|
||||
[tx_hash, 13, True],
|
||||
)
|
||||
t = s.apply_async()
|
||||
t.get()
|
||||
assert t.successful()
|
||||
init_database.refresh(otx)
|
||||
assert otx.status == StatusEnum.REVERTED
|
||||
|
||||
|
||||
|
||||
def test_status_fubar(
|
||||
init_w3,
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
tx_hash = '0x' + os.urandom(32).hex()
|
||||
signed_tx = '0x' + os.urandom(128).hex()
|
||||
account = '0x' + os.urandom(20).hex()
|
||||
|
||||
otx = Otx(0, init_w3.eth.accounts[0], tx_hash, signed_tx)
|
||||
init_database.add(otx)
|
||||
init_database.commit()
|
||||
|
||||
txc = TxCache(tx_hash, account, init_w3.eth.accounts[0], zero_address, zero_address, 13, 13)
|
||||
init_database.add(txc)
|
||||
init_database.commit()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.set_sent_status',
|
||||
[tx_hash],
|
||||
)
|
||||
t = s.apply_async()
|
||||
t.get()
|
||||
assert t.successful()
|
||||
init_database.refresh(otx)
|
||||
assert otx.status == StatusEnum.SENT
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.queue.tx.set_fubar',
|
||||
[tx_hash],
|
||||
)
|
||||
t = s.apply_async()
|
||||
t.get()
|
||||
for n in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
otx = Otx.load(tx_hash)
|
||||
assert otx.status & StatusBits.UNKNOWN_ERROR
|
@ -1,133 +0,0 @@
|
||||
# standard imports
|
||||
import logging
|
||||
import time
|
||||
|
||||
# third-party imports
|
||||
import celery
|
||||
|
||||
# local imports
|
||||
from cic_eth.db.models.base import SessionBase
|
||||
from cic_eth.db.models.otx import Otx
|
||||
from cic_eth.db.enum import (
|
||||
StatusEnum,
|
||||
StatusBits,
|
||||
is_error_status,
|
||||
)
|
||||
from cic_eth.eth.task import sign_and_register_tx
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
def test_states_initial(
|
||||
init_w3,
|
||||
init_database,
|
||||
init_eth_account_roles,
|
||||
celery_session_worker,
|
||||
):
|
||||
tx = {
|
||||
'from': init_w3.eth.accounts[0],
|
||||
'to': init_w3.eth.accounts[1],
|
||||
'nonce': 13,
|
||||
'gas': 21000,
|
||||
'gasPrice': 1000000,
|
||||
'value': 128,
|
||||
'chainId': 42,
|
||||
'data': '',
|
||||
}
|
||||
(tx_hash_hex, tx_raw_signed_hex) = sign_and_register_tx(tx, 'foo:bar:42', None)
|
||||
|
||||
otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first()
|
||||
assert otx.status == StatusEnum.PENDING.value
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.tx.check_gas',
|
||||
[
|
||||
[tx_hash_hex],
|
||||
'foo:bar:42',
|
||||
[tx_raw_signed_hex],
|
||||
init_w3.eth.accounts[0],
|
||||
8000000,
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
for c in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
session = SessionBase.create_session()
|
||||
otx = session.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first()
|
||||
assert otx.status == StatusEnum.READYSEND.value
|
||||
|
||||
otx.waitforgas(session=session)
|
||||
session.commit()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.tx.check_gas',
|
||||
[
|
||||
[tx_hash_hex],
|
||||
'foo:bar:42',
|
||||
[tx_raw_signed_hex],
|
||||
init_w3.eth.accounts[0],
|
||||
8000000,
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
for c in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
session = SessionBase.create_session()
|
||||
otx = session.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first()
|
||||
assert otx.status == StatusEnum.READYSEND.value
|
||||
|
||||
|
||||
def test_states_failed(
|
||||
init_w3,
|
||||
init_database,
|
||||
init_eth_account_roles,
|
||||
celery_session_worker,
|
||||
):
|
||||
tx = {
|
||||
'from': init_w3.eth.accounts[0],
|
||||
'to': init_w3.eth.accounts[1],
|
||||
'nonce': 13,
|
||||
'gas': 21000,
|
||||
'gasPrice': 1000000,
|
||||
'value': 128,
|
||||
'chainId': 42,
|
||||
'data': '',
|
||||
}
|
||||
(tx_hash_hex, tx_raw_signed_hex) = sign_and_register_tx(tx, 'foo:bar:42', None)
|
||||
|
||||
otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first()
|
||||
otx.sendfail(session=init_database)
|
||||
|
||||
init_database.commit()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.tx.check_gas',
|
||||
[
|
||||
[tx_hash_hex],
|
||||
'foo:bar:42',
|
||||
[tx_raw_signed_hex],
|
||||
init_w3.eth.accounts[0],
|
||||
8000000,
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
for c in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
init_database.commit()
|
||||
|
||||
otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first()
|
||||
assert otx.status & StatusEnum.RETRY == StatusEnum.RETRY
|
||||
#assert otx.status & StatusBits.QUEUED
|
||||
assert is_error_status(otx.status)
|
@ -1,51 +0,0 @@
|
||||
# standard imports
|
||||
import logging
|
||||
|
||||
# third-party imports
|
||||
import celery
|
||||
|
||||
# local imports
|
||||
from cic_eth.eth.token import TokenTxFactory
|
||||
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
def test_approve(
|
||||
init_rpc,
|
||||
default_chain_spec,
|
||||
celery_session_worker,
|
||||
bancor_tokens,
|
||||
bancor_registry,
|
||||
cic_registry,
|
||||
):
|
||||
|
||||
token_data = [
|
||||
{
|
||||
'address': bancor_tokens[0],
|
||||
},
|
||||
]
|
||||
s_nonce = celery.signature(
|
||||
'cic_eth.eth.tx.reserve_nonce',
|
||||
[
|
||||
token_data,
|
||||
init_rpc.w3.eth.accounts[0],
|
||||
],
|
||||
queue=None,
|
||||
)
|
||||
s_approve = celery.signature(
|
||||
'cic_eth.eth.token.approve',
|
||||
[
|
||||
init_rpc.w3.eth.accounts[0],
|
||||
init_rpc.w3.eth.accounts[1],
|
||||
1024,
|
||||
str(default_chain_spec),
|
||||
],
|
||||
)
|
||||
s_nonce.link(s_approve)
|
||||
t = s_nonce.apply_async()
|
||||
t.get()
|
||||
for r in t.collect():
|
||||
logg.debug('result {}'.format(r))
|
||||
|
||||
assert t.successful()
|
@ -1,168 +0,0 @@
|
||||
# standard imports
|
||||
import logging
|
||||
import os
|
||||
|
||||
# third-party imports
|
||||
import celery
|
||||
import pytest
|
||||
|
||||
# local imports
|
||||
import cic_eth
|
||||
from cic_eth.db.models.lock import Lock
|
||||
from cic_eth.db.enum import StatusEnum
|
||||
from cic_eth.db.enum import LockEnum
|
||||
from cic_eth.error import LockedError
|
||||
from cic_eth.queue.tx import create as queue_create
|
||||
from cic_eth.queue.tx import set_sent_status
|
||||
from cic_eth.eth.tx import cache_gas_refill_data
|
||||
from cic_eth.error import PermanentTxError
|
||||
from cic_eth.queue.tx import get_tx
|
||||
from cic_eth.eth.task import sign_tx
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
# TODO: There is no
|
||||
def test_send_reject(
|
||||
default_chain_spec,
|
||||
init_w3,
|
||||
mocker,
|
||||
init_database,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
nonce = init_w3.eth.getTransactionCount(init_w3.eth.accounts[0], 'pending')
|
||||
tx = {
|
||||
'from': init_w3.eth.accounts[0],
|
||||
'to': init_w3.eth.accounts[1],
|
||||
'nonce': nonce,
|
||||
'gas': 21000,
|
||||
'gasPrice': 1000000,
|
||||
'value': 128,
|
||||
'chainId': default_chain_spec.chain_id(),
|
||||
'data': '',
|
||||
}
|
||||
|
||||
chain_str = str(default_chain_spec)
|
||||
|
||||
(tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, chain_str)
|
||||
queue_create(tx['nonce'], tx['from'], tx_hash_hex, tx_signed_raw_hex, str(default_chain_spec))
|
||||
cache_gas_refill_data(tx_hash_hex, tx)
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.tx.send',
|
||||
[
|
||||
[tx_signed_raw_hex],
|
||||
chain_str,
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
|
||||
|
||||
def test_sync_tx(
|
||||
default_chain_spec,
|
||||
init_database,
|
||||
init_w3,
|
||||
init_wallet_extension,
|
||||
init_eth_tester,
|
||||
celery_session_worker,
|
||||
eth_empty_accounts,
|
||||
):
|
||||
|
||||
nonce = init_w3.eth.getTransactionCount(init_w3.eth.accounts[0], 'pending')
|
||||
tx = {
|
||||
'from': init_w3.eth.accounts[0],
|
||||
'to': init_w3.eth.accounts[1],
|
||||
'nonce': nonce,
|
||||
'gas': 21000,
|
||||
'gasPrice': 1000000,
|
||||
'value': 128,
|
||||
'chainId': default_chain_spec.chain_id(),
|
||||
'data': '',
|
||||
}
|
||||
|
||||
chain_str = str(default_chain_spec)
|
||||
|
||||
(tx_hash_hex, tx_signed_raw_hex) = sign_tx(tx, chain_str)
|
||||
queue_create(tx['nonce'], tx['from'], tx_hash_hex, tx_signed_raw_hex, str(default_chain_spec))
|
||||
cache_gas_refill_data(tx_hash_hex, tx)
|
||||
|
||||
init_w3.eth.send_raw_transaction(tx_signed_raw_hex)
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.tx.sync_tx',
|
||||
[
|
||||
tx_hash_hex,
|
||||
chain_str,
|
||||
],
|
||||
queue=None
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
for _ in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
tx_dict = get_tx(tx_hash_hex)
|
||||
assert tx_dict['status'] == StatusEnum.SENT
|
||||
|
||||
init_eth_tester.mine_block()
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.tx.sync_tx',
|
||||
[
|
||||
tx_hash_hex,
|
||||
chain_str,
|
||||
],
|
||||
queue=None
|
||||
)
|
||||
t = s.apply_async()
|
||||
r = t.get()
|
||||
for _ in t.collect():
|
||||
pass
|
||||
assert t.successful()
|
||||
|
||||
tx_dict = get_tx(tx_hash_hex)
|
||||
assert tx_dict['status'] == StatusEnum.SUCCESS
|
||||
|
||||
|
||||
|
||||
def test_resume_tx(
|
||||
default_chain_spec,
|
||||
init_database,
|
||||
init_w3,
|
||||
celery_session_worker,
|
||||
):
|
||||
|
||||
tx = {
|
||||
'from': init_w3.eth.accounts[0],
|
||||
'to': init_w3.eth.accounts[1],
|
||||
'nonce': 42 ,
|
||||
'gas': 21000,
|
||||
'gasPrice': 1000000,
|
||||
'value': 128,
|
||||
'chainId': default_chain_spec.chain_id(),
|
||||
'data': '',
|
||||
}
|
||||
tx_signed = init_w3.eth.sign_transaction(tx)
|
||||
tx_hash = init_w3.keccak(hexstr=tx_signed['raw'])
|
||||
tx_hash_hex = tx_hash.hex()
|
||||
queue_create(tx['nonce'], tx['from'], tx_hash_hex, tx_signed['raw'], str(default_chain_spec))
|
||||
cache_gas_refill_data(tx_hash_hex, tx)
|
||||
|
||||
set_sent_status(tx_hash_hex, True)
|
||||
|
||||
s = celery.signature(
|
||||
'cic_eth.eth.tx.resume_tx',
|
||||
[
|
||||
tx_hash_hex,
|
||||
str(default_chain_spec),
|
||||
],
|
||||
)
|
||||
t = s.apply_async()
|
||||
t.get()
|
||||
for r in t.collect():
|
||||
logg.debug('collect {}'.format(r))
|
||||
assert t.successful()
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
|
||||
def test_default(
|
||||
init_database,
|
||||
):
|
||||
pass
|
||||
|
||||
def test_w3(
|
||||
init_w3,
|
||||
):
|
||||
a = init_w3.eth.accounts[0]
|
@ -1,27 +0,0 @@
|
||||
# standard imports
|
||||
import logging
|
||||
import sha3
|
||||
|
||||
# third-party imports
|
||||
import pytest
|
||||
|
||||
logg = logging.getLogger()
|
||||
|
||||
|
||||
def test_sign(
|
||||
init_w3,
|
||||
init_eth_tester,
|
||||
):
|
||||
nonce = init_w3.eth.getTransactionCount(init_w3.eth.accounts[0], 'pending')
|
||||
tx = init_w3.eth.sign_transaction({
|
||||
'from': init_w3.eth.accounts[0],
|
||||
'to': init_w3.eth.accounts[1],
|
||||
'nonce': nonce,
|
||||
'value': 101,
|
||||
'gasPrice': 2000000000,
|
||||
'gas': 21000,
|
||||
'data': '',
|
||||
'chainId': 8995,
|
||||
})
|
||||
tx_hash = init_w3.eth.send_raw_transaction(tx['raw'])
|
||||
logg.debug('have tx {}'.format(tx_hash))
|
@ -1 +0,0 @@
|
||||
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addedAccount","type":"address"},{"indexed":true,"internalType":"uint256","name":"accountIndex","type":"uint256"}],"name":"AccountAdded","type":"event"},{"inputs":[{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"accounts","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"accountsIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"add","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_writer","type":"address"}],"name":"addWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"count","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_writer","type":"address"}],"name":"deleteWriter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"have","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
|
@ -1 +0,0 @@
|
||||
[{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reserveToken","type":"address"}],"name":"reserveBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserveRatio","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserveTokenCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserveTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reserveToken","type":"address"}],"name":"reserveWeight","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_conversionFee","type":"uint32"}],"name":"setConversionFee","outputs":[],"stateMutability":"nonpayable","type":"function"}]
|
@ -1 +0,0 @@
|
||||
[{"inputs":[],"name":"getConvertibleTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_type","type":"uint16"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint32","name":"_maxConversionFee","type":"uint32"},{"internalType":"address[]","name":"_reserveTokens","type":"address[]"},{"internalType":"uint32[]","name":"_reserveWeights","type":"uint32[]"}],"name":"newConverter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"}]
|
@ -1 +0,0 @@
|
||||
[{"inputs":[{"internalType":"bytes32","name":"_initialDescription","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"},{"internalType":"bytes32","name":"_proof","type":"bytes32"}],"name":"addDeclaration","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"contents","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"address","name":"_subject","type":"address"}],"name":"declaration","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"},{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"declarationAddressAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_declarator","type":"address"}],"name":"declarationCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"},{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"declaratorAddressAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_subject","type":"address"}],"name":"declaratorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
|
1
apps/cic-eth/tests/testdata/abi/ERC20.json
vendored
1
apps/cic-eth/tests/testdata/abi/ERC20.json
vendored
@ -1 +0,0 @@
|
||||
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
|
1
apps/cic-eth/tests/testdata/abi/Faucet.json
vendored
1
apps/cic-eth/tests/testdata/abi/Faucet.json
vendored
@ -1 +0,0 @@
|
||||
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"FaucetFail","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"FaucetUsed","type":"event"},{"inputs":[],"name":"amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"giveTo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setAmount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
|
1
apps/cic-eth/tests/testdata/abi/Network.json
vendored
1
apps/cic-eth/tests/testdata/abi/Network.json
vendored
@ -1 +0,0 @@
|
||||
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_smartToken","type":"address"},{"indexed":true,"internalType":"address","name":"_fromToken","type":"address"},{"indexed":true,"internalType":"address","name":"_toToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_fromAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"_trader","type":"address"}],"name":"Conversion","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"convert","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"rateByPath","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
|
@ -1 +0,0 @@
|
||||
[{"inputs":[{"internalType":"bytes32","name":"_identifier","type":"bytes32"}],"name":"chainOf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_chain","type":"bytes32"}],"name":"configSumOf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"identifiers","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_identifier","type":"bytes32"},{"internalType":"address","name":"_address","type":"address"},{"internalType":"bytes32","name":"_chainDescriptor","type":"bytes32"},{"internalType":"bytes32","name":"_chainConfig","type":"bytes32"}],"name":"set","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
|
@ -1 +0,0 @@
|
||||
[{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"addressOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
|
@ -1 +0,0 @@
|
||||
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"serial","type":"uint256"}],"name":"NewExecution","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"serial","type":"uint256"}],"name":"NewRejection","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"NewRequest","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"execute","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serial","type":"uint256"}],"name":"reject","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"request","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requests","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"serial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
|
151530
apps/cic-eth/tests/testdata/bancor/BancorFormula.json
vendored
151530
apps/cic-eth/tests/testdata/bancor/BancorFormula.json
vendored
File diff suppressed because one or more lines are too long
56968
apps/cic-eth/tests/testdata/bancor/BancorNetwork.json
vendored
56968
apps/cic-eth/tests/testdata/bancor/BancorNetwork.json
vendored
File diff suppressed because one or more lines are too long
24111
apps/cic-eth/tests/testdata/bancor/BancorX.json
vendored
24111
apps/cic-eth/tests/testdata/bancor/BancorX.json
vendored
File diff suppressed because one or more lines are too long
@ -1,704 +0,0 @@
|
||||
{
|
||||
"contractName": "ChainlinkETHToETHOracle",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "latestAnswer",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "int256",
|
||||
"name": "",
|
||||
"type": "int256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "latestTimestamp",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Provides the trivial ETH/ETH rate to be used with other TKN/ETH rates\",\"kind\":\"dev\",\"methods\":{\"latestAnswer()\":{\"details\":\"returns the trivial ETH/ETH rate.\",\"returns\":{\"_0\":\"always returns the trivial rate of 1\"}},\"latestTimestamp()\":{\"details\":\"returns the trivial ETH/ETH update time.\",\"returns\":{\"_0\":\"always returns current block's timestamp\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ChainlinkETHToETHOracle.sol\":\"ChainlinkETHToETHOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ChainlinkETHToETHOracle.sol\":{\"keccak256\":\"0x4e0c0568103a535f522cf43833e3632ce9a79c6e6d62b2e116b83f21afbe2d78\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b656f1c4c522b77bd73347d9857fedb0dc72306b50d6e3879222b9ca6fc6a75e\",\"dweb:/ipfs/Qmeqp6RQV5RciQCWkFE4DiYb5ZybhJyXqif3n5bkVrd4BA\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]}},\"version\":1}",
|
||||
"bytecode": "0x6080604052348015600f57600080fd5b5060948061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806350d25bcd1460375780638205bf6a14604f575b600080fd5b603d6055565b60408051918252519081900360200190f35b603d605a565b600190565b429056fea2646970667358221220c822ae6afcb353631cf38e35b68885314d174a60445c8b6f4e095de2c2451b7164736f6c634300060c0033",
|
||||
"deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c806350d25bcd1460375780638205bf6a14604f575b600080fd5b603d6055565b60408051918252519081900360200190f35b603d605a565b600190565b429056fea2646970667358221220c822ae6afcb353631cf38e35b68885314d174a60445c8b6f4e095de2c2451b7164736f6c634300060c0033",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "212:563:54:-:0;;;;;;;;;;;;;;;;;;;",
|
||||
"deployedSourceMap": "212:563:54:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;442:96;;;:::i;:::-;;;;;;;;;;;;;;;;678:95;;;:::i;442:96::-;311:1;442:96;:::o;678:95::-;763:3;678:95;:::o",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\nimport \"./interfaces/IChainlinkPriceOracle.sol\";\n\n/**\n * @dev Provides the trivial ETH/ETH rate to be used with other TKN/ETH rates\n*/\ncontract ChainlinkETHToETHOracle is IChainlinkPriceOracle {\n int256 private constant ETH_RATE = 1;\n\n /**\n * @dev returns the trivial ETH/ETH rate.\n *\n * @return always returns the trivial rate of 1\n */\n function latestAnswer() external view override returns (int256) {\n return ETH_RATE;\n }\n\n /**\n * @dev returns the trivial ETH/ETH update time.\n *\n * @return always returns current block's timestamp\n */\n function latestTimestamp() external view override returns (uint256) {\n return now;\n }\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ChainlinkETHToETHOracle.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ChainlinkETHToETHOracle.sol",
|
||||
"exportedSymbols": {
|
||||
"ChainlinkETHToETHOracle": [
|
||||
21212
|
||||
]
|
||||
},
|
||||
"id": 21213,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 21184,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:54"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol",
|
||||
"file": "./interfaces/IChainlinkPriceOracle.sol",
|
||||
"id": 21185,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 21213,
|
||||
"sourceUnit": 22822,
|
||||
"src": "76:48:54",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [
|
||||
{
|
||||
"arguments": null,
|
||||
"baseName": {
|
||||
"contractScope": null,
|
||||
"id": 21187,
|
||||
"name": "IChainlinkPriceOracle",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 22821,
|
||||
"src": "248:21:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
|
||||
"typeString": "contract IChainlinkPriceOracle"
|
||||
}
|
||||
},
|
||||
"id": 21188,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "248:21:54"
|
||||
}
|
||||
],
|
||||
"contractDependencies": [
|
||||
22821
|
||||
],
|
||||
"contractKind": "contract",
|
||||
"documentation": {
|
||||
"id": 21186,
|
||||
"nodeType": "StructuredDocumentation",
|
||||
"src": "126:85:54",
|
||||
"text": " @dev Provides the trivial ETH/ETH rate to be used with other TKN/ETH rates"
|
||||
},
|
||||
"fullyImplemented": true,
|
||||
"id": 21212,
|
||||
"linearizedBaseContracts": [
|
||||
21212,
|
||||
22821
|
||||
],
|
||||
"name": "ChainlinkETHToETHOracle",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"constant": true,
|
||||
"id": 21191,
|
||||
"mutability": "constant",
|
||||
"name": "ETH_RATE",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21212,
|
||||
"src": "276:36:54",
|
||||
"stateVariable": true,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21189,
|
||||
"name": "int256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "276:6:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"argumentTypes": null,
|
||||
"hexValue": "31",
|
||||
"id": 21190,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "311:1:54",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_1_by_1",
|
||||
"typeString": "int_const 1"
|
||||
},
|
||||
"value": "1"
|
||||
},
|
||||
"visibility": "private"
|
||||
},
|
||||
{
|
||||
"baseFunctions": [
|
||||
22815
|
||||
],
|
||||
"body": {
|
||||
"id": 21200,
|
||||
"nodeType": "Block",
|
||||
"src": "506:32:54",
|
||||
"statements": [
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"id": 21198,
|
||||
"name": "ETH_RATE",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 21191,
|
||||
"src": "523:8:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
}
|
||||
},
|
||||
"functionReturnParameters": 21197,
|
||||
"id": 21199,
|
||||
"nodeType": "Return",
|
||||
"src": "516:15:54"
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": {
|
||||
"id": 21192,
|
||||
"nodeType": "StructuredDocumentation",
|
||||
"src": "319:118:54",
|
||||
"text": " @dev returns the trivial ETH/ETH rate.\n @return always returns the trivial rate of 1"
|
||||
},
|
||||
"functionSelector": "50d25bcd",
|
||||
"id": 21201,
|
||||
"implemented": true,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "latestAnswer",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": {
|
||||
"id": 21194,
|
||||
"nodeType": "OverrideSpecifier",
|
||||
"overrides": [],
|
||||
"src": "480:8:54"
|
||||
},
|
||||
"parameters": {
|
||||
"id": 21193,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "463:2:54"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21197,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21196,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21201,
|
||||
"src": "498:6:54",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21195,
|
||||
"name": "int256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "498:6:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "497:8:54"
|
||||
},
|
||||
"scope": 21212,
|
||||
"src": "442:96:54",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"baseFunctions": [
|
||||
22820
|
||||
],
|
||||
"body": {
|
||||
"id": 21210,
|
||||
"nodeType": "Block",
|
||||
"src": "746:27:54",
|
||||
"statements": [
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"id": 21208,
|
||||
"name": "now",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": -17,
|
||||
"src": "763:3:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"functionReturnParameters": 21207,
|
||||
"id": 21209,
|
||||
"nodeType": "Return",
|
||||
"src": "756:10:54"
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": {
|
||||
"id": 21202,
|
||||
"nodeType": "StructuredDocumentation",
|
||||
"src": "544:129:54",
|
||||
"text": " @dev returns the trivial ETH/ETH update time.\n @return always returns current block's timestamp"
|
||||
},
|
||||
"functionSelector": "8205bf6a",
|
||||
"id": 21211,
|
||||
"implemented": true,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "latestTimestamp",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": {
|
||||
"id": 21204,
|
||||
"nodeType": "OverrideSpecifier",
|
||||
"overrides": [],
|
||||
"src": "719:8:54"
|
||||
},
|
||||
"parameters": {
|
||||
"id": 21203,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "702:2:54"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21207,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21206,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21211,
|
||||
"src": "737:7:54",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21205,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "737:7:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "736:9:54"
|
||||
},
|
||||
"scope": 21212,
|
||||
"src": "678:95:54",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 21213,
|
||||
"src": "212:563:54"
|
||||
}
|
||||
],
|
||||
"src": "51:725:54"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ChainlinkETHToETHOracle.sol",
|
||||
"exportedSymbols": {
|
||||
"ChainlinkETHToETHOracle": [
|
||||
21212
|
||||
]
|
||||
},
|
||||
"id": 21213,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 21184,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:54"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol",
|
||||
"file": "./interfaces/IChainlinkPriceOracle.sol",
|
||||
"id": 21185,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 21213,
|
||||
"sourceUnit": 22822,
|
||||
"src": "76:48:54",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [
|
||||
{
|
||||
"arguments": null,
|
||||
"baseName": {
|
||||
"contractScope": null,
|
||||
"id": 21187,
|
||||
"name": "IChainlinkPriceOracle",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 22821,
|
||||
"src": "248:21:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IChainlinkPriceOracle_$22821",
|
||||
"typeString": "contract IChainlinkPriceOracle"
|
||||
}
|
||||
},
|
||||
"id": 21188,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "248:21:54"
|
||||
}
|
||||
],
|
||||
"contractDependencies": [
|
||||
22821
|
||||
],
|
||||
"contractKind": "contract",
|
||||
"documentation": {
|
||||
"id": 21186,
|
||||
"nodeType": "StructuredDocumentation",
|
||||
"src": "126:85:54",
|
||||
"text": " @dev Provides the trivial ETH/ETH rate to be used with other TKN/ETH rates"
|
||||
},
|
||||
"fullyImplemented": true,
|
||||
"id": 21212,
|
||||
"linearizedBaseContracts": [
|
||||
21212,
|
||||
22821
|
||||
],
|
||||
"name": "ChainlinkETHToETHOracle",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"constant": true,
|
||||
"id": 21191,
|
||||
"mutability": "constant",
|
||||
"name": "ETH_RATE",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21212,
|
||||
"src": "276:36:54",
|
||||
"stateVariable": true,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21189,
|
||||
"name": "int256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "276:6:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"argumentTypes": null,
|
||||
"hexValue": "31",
|
||||
"id": 21190,
|
||||
"isConstant": false,
|
||||
"isLValue": false,
|
||||
"isPure": true,
|
||||
"kind": "number",
|
||||
"lValueRequested": false,
|
||||
"nodeType": "Literal",
|
||||
"src": "311:1:54",
|
||||
"subdenomination": null,
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_rational_1_by_1",
|
||||
"typeString": "int_const 1"
|
||||
},
|
||||
"value": "1"
|
||||
},
|
||||
"visibility": "private"
|
||||
},
|
||||
{
|
||||
"baseFunctions": [
|
||||
22815
|
||||
],
|
||||
"body": {
|
||||
"id": 21200,
|
||||
"nodeType": "Block",
|
||||
"src": "506:32:54",
|
||||
"statements": [
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"id": 21198,
|
||||
"name": "ETH_RATE",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": 21191,
|
||||
"src": "523:8:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
}
|
||||
},
|
||||
"functionReturnParameters": 21197,
|
||||
"id": 21199,
|
||||
"nodeType": "Return",
|
||||
"src": "516:15:54"
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": {
|
||||
"id": 21192,
|
||||
"nodeType": "StructuredDocumentation",
|
||||
"src": "319:118:54",
|
||||
"text": " @dev returns the trivial ETH/ETH rate.\n @return always returns the trivial rate of 1"
|
||||
},
|
||||
"functionSelector": "50d25bcd",
|
||||
"id": 21201,
|
||||
"implemented": true,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "latestAnswer",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": {
|
||||
"id": 21194,
|
||||
"nodeType": "OverrideSpecifier",
|
||||
"overrides": [],
|
||||
"src": "480:8:54"
|
||||
},
|
||||
"parameters": {
|
||||
"id": 21193,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "463:2:54"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21197,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21196,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21201,
|
||||
"src": "498:6:54",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21195,
|
||||
"name": "int256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "498:6:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "497:8:54"
|
||||
},
|
||||
"scope": 21212,
|
||||
"src": "442:96:54",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"baseFunctions": [
|
||||
22820
|
||||
],
|
||||
"body": {
|
||||
"id": 21210,
|
||||
"nodeType": "Block",
|
||||
"src": "746:27:54",
|
||||
"statements": [
|
||||
{
|
||||
"expression": {
|
||||
"argumentTypes": null,
|
||||
"id": 21208,
|
||||
"name": "now",
|
||||
"nodeType": "Identifier",
|
||||
"overloadedDeclarations": [],
|
||||
"referencedDeclaration": -17,
|
||||
"src": "763:3:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"functionReturnParameters": 21207,
|
||||
"id": 21209,
|
||||
"nodeType": "Return",
|
||||
"src": "756:10:54"
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": {
|
||||
"id": 21202,
|
||||
"nodeType": "StructuredDocumentation",
|
||||
"src": "544:129:54",
|
||||
"text": " @dev returns the trivial ETH/ETH update time.\n @return always returns current block's timestamp"
|
||||
},
|
||||
"functionSelector": "8205bf6a",
|
||||
"id": 21211,
|
||||
"implemented": true,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "latestTimestamp",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": {
|
||||
"id": 21204,
|
||||
"nodeType": "OverrideSpecifier",
|
||||
"overrides": [],
|
||||
"src": "719:8:54"
|
||||
},
|
||||
"parameters": {
|
||||
"id": 21203,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "702:2:54"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21207,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21206,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21211,
|
||||
"src": "737:7:54",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21205,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "737:7:54",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "736:9:54"
|
||||
},
|
||||
"scope": 21212,
|
||||
"src": "678:95:54",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 21213,
|
||||
"src": "212:563:54"
|
||||
}
|
||||
],
|
||||
"src": "51:725:54"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.837Z",
|
||||
"devdoc": {
|
||||
"details": "Provides the trivial ETH/ETH rate to be used with other TKN/ETH rates",
|
||||
"kind": "dev",
|
||||
"methods": {
|
||||
"latestAnswer()": {
|
||||
"details": "returns the trivial ETH/ETH rate.",
|
||||
"returns": {
|
||||
"_0": "always returns the trivial rate of 1"
|
||||
}
|
||||
},
|
||||
"latestTimestamp()": {
|
||||
"details": "returns the trivial ETH/ETH update time.",
|
||||
"returns": {
|
||||
"_0": "always returns current block's timestamp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
8533
apps/cic-eth/tests/testdata/bancor/ContractRegistry.json
vendored
8533
apps/cic-eth/tests/testdata/bancor/ContractRegistry.json
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
14790
apps/cic-eth/tests/testdata/bancor/ConversionPathFinder.json
vendored
14790
apps/cic-eth/tests/testdata/bancor/ConversionPathFinder.json
vendored
File diff suppressed because one or more lines are too long
28012
apps/cic-eth/tests/testdata/bancor/ConverterBase.json
vendored
28012
apps/cic-eth/tests/testdata/bancor/ConverterBase.json
vendored
File diff suppressed because one or more lines are too long
5936
apps/cic-eth/tests/testdata/bancor/ConverterFactory.json
vendored
5936
apps/cic-eth/tests/testdata/bancor/ConverterFactory.json
vendored
File diff suppressed because one or more lines are too long
40060
apps/cic-eth/tests/testdata/bancor/ConverterRegistry.json
vendored
40060
apps/cic-eth/tests/testdata/bancor/ConverterRegistry.json
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
18634
apps/cic-eth/tests/testdata/bancor/ConverterUpgrader.json
vendored
18634
apps/cic-eth/tests/testdata/bancor/ConverterUpgrader.json
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7601
apps/cic-eth/tests/testdata/bancor/ERC20Token.json
vendored
7601
apps/cic-eth/tests/testdata/bancor/ERC20Token.json
vendored
File diff suppressed because one or more lines are too long
6043
apps/cic-eth/tests/testdata/bancor/EtherToken.json
vendored
6043
apps/cic-eth/tests/testdata/bancor/EtherToken.json
vendored
File diff suppressed because one or more lines are too long
9682
apps/cic-eth/tests/testdata/bancor/GiftableToken.json
vendored
9682
apps/cic-eth/tests/testdata/bancor/GiftableToken.json
vendored
File diff suppressed because one or more lines are too long
2929
apps/cic-eth/tests/testdata/bancor/IBancorFormula.json
vendored
2929
apps/cic-eth/tests/testdata/bancor/IBancorFormula.json
vendored
File diff suppressed because it is too large
Load Diff
837
apps/cic-eth/tests/testdata/bancor/IBancorX.json
vendored
837
apps/cic-eth/tests/testdata/bancor/IBancorX.json
vendored
@ -1,837 +0,0 @@
|
||||
{
|
||||
"contractName": "IBancorX",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "token",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract IERC20Token",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "_toBlockchain",
|
||||
"type": "bytes32"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "_to",
|
||||
"type": "bytes32"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_id",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "xTransfer",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_xTransferId",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_for",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "getXTransferAmount",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_xTransferId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_for\",\"type\":\"address\"}],\"name\":\"getXTransferAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_toBlockchain\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_to\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"xTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":\"IBancorX\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol\":{\"keccak256\":\"0x65b5780d710159c7540078c38406c53db37a349fb468a0bf21bdc6262e497951\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://3df931a12770d10a22451326e38ae9d405d3e2716bdbdd6306b5e2361f6fe511\",\"dweb:/ipfs/QmcRBSaFLz516dAEqb8ZEiyx8ZTHZZ6rfxHn5roL2fHA3S\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../../token/interfaces/IERC20Token.sol\";\n\ninterface IBancorX {\n function token() external view returns (IERC20Token);\n function xTransfer(bytes32 _toBlockchain, bytes32 _to, uint256 _amount, uint256 _id) external;\n function getXTransferAmount(uint256 _xTransferId, address _for) external view returns (uint256);\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol",
|
||||
"exportedSymbols": {
|
||||
"IBancorX": [
|
||||
3551
|
||||
]
|
||||
},
|
||||
"id": 3552,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 3524,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:5"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
|
||||
"file": "../../token/interfaces/IERC20Token.sol",
|
||||
"id": 3525,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 3552,
|
||||
"sourceUnit": 21128,
|
||||
"src": "75:48:5",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 3551,
|
||||
"linearizedBaseContracts": [
|
||||
3551
|
||||
],
|
||||
"name": "IBancorX",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "fc0c546a",
|
||||
"id": 3530,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "token",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 3526,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "164:2:5"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 3529,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3528,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3530,
|
||||
"src": "190:11:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 3527,
|
||||
"name": "IERC20Token",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 21127,
|
||||
"src": "190:11:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "189:13:5"
|
||||
},
|
||||
"scope": 3551,
|
||||
"src": "150:53:5",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "427c0374",
|
||||
"id": 3541,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "xTransfer",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 3539,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3532,
|
||||
"mutability": "mutable",
|
||||
"name": "_toBlockchain",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3541,
|
||||
"src": "227:21:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3531,
|
||||
"name": "bytes32",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "227:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3534,
|
||||
"mutability": "mutable",
|
||||
"name": "_to",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3541,
|
||||
"src": "250:11:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3533,
|
||||
"name": "bytes32",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "250:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3536,
|
||||
"mutability": "mutable",
|
||||
"name": "_amount",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3541,
|
||||
"src": "263:15:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3535,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "263:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3538,
|
||||
"mutability": "mutable",
|
||||
"name": "_id",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3541,
|
||||
"src": "280:11:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3537,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "280:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "226:66:5"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 3540,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "301:0:5"
|
||||
},
|
||||
"scope": 3551,
|
||||
"src": "208:94:5",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "aafd6b76",
|
||||
"id": 3550,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "getXTransferAmount",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 3546,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3543,
|
||||
"mutability": "mutable",
|
||||
"name": "_xTransferId",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3550,
|
||||
"src": "335:20:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3542,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "335:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3545,
|
||||
"mutability": "mutable",
|
||||
"name": "_for",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3550,
|
||||
"src": "357:12:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3544,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "357:7:5",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "334:36:5"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 3549,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3548,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3550,
|
||||
"src": "394:7:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3547,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "394:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "393:9:5"
|
||||
},
|
||||
"scope": 3551,
|
||||
"src": "307:96:5",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 3552,
|
||||
"src": "125:280:5"
|
||||
}
|
||||
],
|
||||
"src": "51:355:5"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorX.sol",
|
||||
"exportedSymbols": {
|
||||
"IBancorX": [
|
||||
3551
|
||||
]
|
||||
},
|
||||
"id": 3552,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 3524,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:5"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
|
||||
"file": "../../token/interfaces/IERC20Token.sol",
|
||||
"id": 3525,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 3552,
|
||||
"sourceUnit": 21128,
|
||||
"src": "75:48:5",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 3551,
|
||||
"linearizedBaseContracts": [
|
||||
3551
|
||||
],
|
||||
"name": "IBancorX",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "fc0c546a",
|
||||
"id": 3530,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "token",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 3526,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "164:2:5"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 3529,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3528,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3530,
|
||||
"src": "190:11:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 3527,
|
||||
"name": "IERC20Token",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 21127,
|
||||
"src": "190:11:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "189:13:5"
|
||||
},
|
||||
"scope": 3551,
|
||||
"src": "150:53:5",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "427c0374",
|
||||
"id": 3541,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "xTransfer",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 3539,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3532,
|
||||
"mutability": "mutable",
|
||||
"name": "_toBlockchain",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3541,
|
||||
"src": "227:21:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3531,
|
||||
"name": "bytes32",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "227:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3534,
|
||||
"mutability": "mutable",
|
||||
"name": "_to",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3541,
|
||||
"src": "250:11:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3533,
|
||||
"name": "bytes32",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "250:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3536,
|
||||
"mutability": "mutable",
|
||||
"name": "_amount",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3541,
|
||||
"src": "263:15:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3535,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "263:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3538,
|
||||
"mutability": "mutable",
|
||||
"name": "_id",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3541,
|
||||
"src": "280:11:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3537,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "280:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "226:66:5"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 3540,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "301:0:5"
|
||||
},
|
||||
"scope": 3551,
|
||||
"src": "208:94:5",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "aafd6b76",
|
||||
"id": 3550,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "getXTransferAmount",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 3546,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3543,
|
||||
"mutability": "mutable",
|
||||
"name": "_xTransferId",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3550,
|
||||
"src": "335:20:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3542,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "335:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3545,
|
||||
"mutability": "mutable",
|
||||
"name": "_for",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3550,
|
||||
"src": "357:12:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3544,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "357:7:5",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "334:36:5"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 3549,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3548,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3550,
|
||||
"src": "394:7:5",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3547,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "394:7:5",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "393:9:5"
|
||||
},
|
||||
"scope": 3551,
|
||||
"src": "307:96:5",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 3552,
|
||||
"src": "125:280:5"
|
||||
}
|
||||
],
|
||||
"src": "51:355:5"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.669Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
@ -1,326 +0,0 @@
|
||||
{
|
||||
"contractName": "IBancorXUpgrader",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint16",
|
||||
"name": "_version",
|
||||
"type": "uint16"
|
||||
},
|
||||
{
|
||||
"internalType": "address[]",
|
||||
"name": "_reporters",
|
||||
"type": "address[]"
|
||||
}
|
||||
],
|
||||
"name": "upgrade",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"address[]\",\"name\":\"_reporters\",\"type\":\"address[]\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol\":\"IBancorXUpgrader\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol\":{\"keccak256\":\"0x5292f6484aafd5e225b0d4f7fe61235ebee69ada5044a84e3f94014053d8a373\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://f796012a45f7d9c47239725ad638f8636146686a5a390bd85892e889a20459b2\",\"dweb:/ipfs/QmRbfxfYCssyj1PkQMdv1rsjUz35BDTLag4wrxnq4SAy2j\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Bancor X Upgrader interface\n*/\ninterface IBancorXUpgrader {\n function upgrade(uint16 _version, address[] memory _reporters) external;\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol",
|
||||
"exportedSymbols": {
|
||||
"IBancorXUpgrader": [
|
||||
3562
|
||||
]
|
||||
},
|
||||
"id": 3563,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 3553,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:6"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 3562,
|
||||
"linearizedBaseContracts": [
|
||||
3562
|
||||
],
|
||||
"name": "IBancorXUpgrader",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "546872cc",
|
||||
"id": 3561,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "upgrade",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 3559,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3555,
|
||||
"mutability": "mutable",
|
||||
"name": "_version",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3561,
|
||||
"src": "164:15:6",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3554,
|
||||
"name": "uint16",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "164:6:6",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3558,
|
||||
"mutability": "mutable",
|
||||
"name": "_reporters",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3561,
|
||||
"src": "181:27:6",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
||||
"typeString": "address[]"
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 3556,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "181:7:6",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"id": 3557,
|
||||
"length": null,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "181:9:6",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
||||
"typeString": "address[]"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "163:46:6"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 3560,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "218:0:6"
|
||||
},
|
||||
"scope": 3562,
|
||||
"src": "147:72:6",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 3563,
|
||||
"src": "114:107:6"
|
||||
}
|
||||
],
|
||||
"src": "51:171:6"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/bancorx/interfaces/IBancorXUpgrader.sol",
|
||||
"exportedSymbols": {
|
||||
"IBancorXUpgrader": [
|
||||
3562
|
||||
]
|
||||
},
|
||||
"id": 3563,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 3553,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:6"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 3562,
|
||||
"linearizedBaseContracts": [
|
||||
3562
|
||||
],
|
||||
"name": "IBancorXUpgrader",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "546872cc",
|
||||
"id": 3561,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "upgrade",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 3559,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3555,
|
||||
"mutability": "mutable",
|
||||
"name": "_version",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3561,
|
||||
"src": "164:15:6",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 3554,
|
||||
"name": "uint16",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "164:6:6",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 3558,
|
||||
"mutability": "mutable",
|
||||
"name": "_reporters",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 3561,
|
||||
"src": "181:27:6",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
||||
"typeString": "address[]"
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 3556,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "181:7:6",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"id": 3557,
|
||||
"length": null,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "181:9:6",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
||||
"typeString": "address[]"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "163:46:6"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 3560,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "218:0:6"
|
||||
},
|
||||
"scope": 3562,
|
||||
"src": "147:72:6",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 3563,
|
||||
"src": "114:107:6"
|
||||
}
|
||||
],
|
||||
"src": "51:171:6"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.670Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
@ -1,372 +0,0 @@
|
||||
{
|
||||
"contractName": "IChainlinkPriceOracle",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "latestAnswer",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "int256",
|
||||
"name": "",
|
||||
"type": "int256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "latestTimestamp",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":\"IChainlinkPriceOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol\":{\"keccak256\":\"0x544a1d335c9a30e5543f5c069bbd9f73e6478b0a6941481619a0d20eea159c2a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://8649d3ff5e21bf5ff21d45a62193974e08ccec27b392e91cbfdad479a60e87f0\",\"dweb:/ipfs/QmatS5peisTv9PdqVz9eSuveQdhJBqpxfpr5q4YsMv51CZ\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Chainlink Price Oracle interface\n*/\ninterface IChainlinkPriceOracle {\n function latestAnswer() external view returns (int256);\n function latestTimestamp() external view returns (uint256);\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol",
|
||||
"exportedSymbols": {
|
||||
"IChainlinkPriceOracle": [
|
||||
22821
|
||||
]
|
||||
},
|
||||
"id": 22822,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 22810,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:66"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 22821,
|
||||
"linearizedBaseContracts": [
|
||||
22821
|
||||
],
|
||||
"name": "IChainlinkPriceOracle",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "50d25bcd",
|
||||
"id": 22815,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "latestAnswer",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22811,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "178:2:66"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22814,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22813,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22815,
|
||||
"src": "204:6:66",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22812,
|
||||
"name": "int256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "204:6:66",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "203:8:66"
|
||||
},
|
||||
"scope": 22821,
|
||||
"src": "157:55:66",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "8205bf6a",
|
||||
"id": 22820,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "latestTimestamp",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22816,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "241:2:66"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22819,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22818,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22820,
|
||||
"src": "267:7:66",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22817,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "267:7:66",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "266:9:66"
|
||||
},
|
||||
"scope": 22821,
|
||||
"src": "217:59:66",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 22822,
|
||||
"src": "119:159:66"
|
||||
}
|
||||
],
|
||||
"src": "51:228:66"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IChainlinkPriceOracle.sol",
|
||||
"exportedSymbols": {
|
||||
"IChainlinkPriceOracle": [
|
||||
22821
|
||||
]
|
||||
},
|
||||
"id": 22822,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 22810,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:66"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 22821,
|
||||
"linearizedBaseContracts": [
|
||||
22821
|
||||
],
|
||||
"name": "IChainlinkPriceOracle",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "50d25bcd",
|
||||
"id": 22815,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "latestAnswer",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22811,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "178:2:66"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22814,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22813,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22815,
|
||||
"src": "204:6:66",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22812,
|
||||
"name": "int256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "204:6:66",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_int256",
|
||||
"typeString": "int256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "203:8:66"
|
||||
},
|
||||
"scope": 22821,
|
||||
"src": "157:55:66",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "8205bf6a",
|
||||
"id": 22820,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "latestTimestamp",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22816,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "241:2:66"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22819,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22818,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22820,
|
||||
"src": "267:7:66",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22817,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "267:7:66",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "266:9:66"
|
||||
},
|
||||
"scope": 22821,
|
||||
"src": "217:59:66",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 22822,
|
||||
"src": "119:159:66"
|
||||
}
|
||||
],
|
||||
"src": "51:228:66"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.849Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
@ -1,309 +0,0 @@
|
||||
{
|
||||
"contractName": "IContractRegistry",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "_contractName",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"name": "addressOf",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_contractName\",\"type\":\"bytes32\"}],\"name\":\"addressOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":\"IContractRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Contract Registry interface\n*/\ninterface IContractRegistry {\n function addressOf(bytes32 _contractName) external view returns (address);\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol",
|
||||
"exportedSymbols": {
|
||||
"IContractRegistry": [
|
||||
22831
|
||||
]
|
||||
},
|
||||
"id": 22832,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 22823,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:67"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 22831,
|
||||
"linearizedBaseContracts": [
|
||||
22831
|
||||
],
|
||||
"name": "IContractRegistry",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "bb34534c",
|
||||
"id": 22830,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "addressOf",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22826,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22825,
|
||||
"mutability": "mutable",
|
||||
"name": "_contractName",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22830,
|
||||
"src": "167:21:67",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22824,
|
||||
"name": "bytes32",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "167:7:67",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "166:23:67"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22829,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22828,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22830,
|
||||
"src": "213:7:67",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22827,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "213:7:67",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "212:9:67"
|
||||
},
|
||||
"scope": 22831,
|
||||
"src": "148:74:67",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 22832,
|
||||
"src": "114:110:67"
|
||||
}
|
||||
],
|
||||
"src": "51:174:67"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol",
|
||||
"exportedSymbols": {
|
||||
"IContractRegistry": [
|
||||
22831
|
||||
]
|
||||
},
|
||||
"id": 22832,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 22823,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:67"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 22831,
|
||||
"linearizedBaseContracts": [
|
||||
22831
|
||||
],
|
||||
"name": "IContractRegistry",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "bb34534c",
|
||||
"id": 22830,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "addressOf",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22826,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22825,
|
||||
"mutability": "mutable",
|
||||
"name": "_contractName",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22830,
|
||||
"src": "167:21:67",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22824,
|
||||
"name": "bytes32",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "167:7:67",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "166:23:67"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22829,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22828,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22830,
|
||||
"src": "213:7:67",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22827,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "213:7:67",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "212:9:67"
|
||||
},
|
||||
"scope": 22831,
|
||||
"src": "148:74:67",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 22832,
|
||||
"src": "114:110:67"
|
||||
}
|
||||
],
|
||||
"src": "51:174:67"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.850Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
@ -1,420 +0,0 @@
|
||||
{
|
||||
"contractName": "IConversionPathFinder",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "contract IERC20Token",
|
||||
"name": "_sourceToken",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "contract IERC20Token",
|
||||
"name": "_targetToken",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "findPath",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address[]",
|
||||
"name": "",
|
||||
"type": "address[]"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Token\",\"name\":\"_targetToken\",\"type\":\"address\"}],\"name\":\"findPath\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":\"IConversionPathFinder\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol\":{\"keccak256\":\"0x2d0f5b57bc448581a6e2296486ca618851138f40928049d75220623605915d7b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://2182eb05da8442792a5f3f4d8cdb2cf0bf9e952ca02638f3880cc59d5fd6dcb6\",\"dweb:/ipfs/QmSH9uWh6zTQkcBgD7VGGSzYW9DjdBDkUZUZ6zhzPWPPDz\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./token/interfaces/IERC20Token.sol\";\n\n/*\n Conversion Path Finder interface\n*/\ninterface IConversionPathFinder {\n function findPath(IERC20Token _sourceToken, IERC20Token _targetToken) external view returns (address[] memory);\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol",
|
||||
"exportedSymbols": {
|
||||
"IConversionPathFinder": [
|
||||
2546
|
||||
]
|
||||
},
|
||||
"id": 2547,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 2534,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:2"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
|
||||
"file": "./token/interfaces/IERC20Token.sol",
|
||||
"id": 2535,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 2547,
|
||||
"sourceUnit": 21128,
|
||||
"src": "75:44:2",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 2546,
|
||||
"linearizedBaseContracts": [
|
||||
2546
|
||||
],
|
||||
"name": "IConversionPathFinder",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "a1c421cd",
|
||||
"id": 2545,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "findPath",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 2540,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2537,
|
||||
"mutability": "mutable",
|
||||
"name": "_sourceToken",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 2545,
|
||||
"src": "220:24:2",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 2536,
|
||||
"name": "IERC20Token",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 21127,
|
||||
"src": "220:11:2",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2539,
|
||||
"mutability": "mutable",
|
||||
"name": "_targetToken",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 2545,
|
||||
"src": "246:24:2",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 2538,
|
||||
"name": "IERC20Token",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 21127,
|
||||
"src": "246:11:2",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "219:52:2"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 2544,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2543,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 2545,
|
||||
"src": "295:16:2",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
||||
"typeString": "address[]"
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 2541,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "295:7:2",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"id": 2542,
|
||||
"length": null,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "295:9:2",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
||||
"typeString": "address[]"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "294:18:2"
|
||||
},
|
||||
"scope": 2546,
|
||||
"src": "202:111:2",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 2547,
|
||||
"src": "164:151:2"
|
||||
}
|
||||
],
|
||||
"src": "51:265:2"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/IConversionPathFinder.sol",
|
||||
"exportedSymbols": {
|
||||
"IConversionPathFinder": [
|
||||
2546
|
||||
]
|
||||
},
|
||||
"id": 2547,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 2534,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:2"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
|
||||
"file": "./token/interfaces/IERC20Token.sol",
|
||||
"id": 2535,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 2547,
|
||||
"sourceUnit": 21128,
|
||||
"src": "75:44:2",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 2546,
|
||||
"linearizedBaseContracts": [
|
||||
2546
|
||||
],
|
||||
"name": "IConversionPathFinder",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "a1c421cd",
|
||||
"id": 2545,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "findPath",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 2540,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2537,
|
||||
"mutability": "mutable",
|
||||
"name": "_sourceToken",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 2545,
|
||||
"src": "220:24:2",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 2536,
|
||||
"name": "IERC20Token",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 21127,
|
||||
"src": "220:11:2",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2539,
|
||||
"mutability": "mutable",
|
||||
"name": "_targetToken",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 2545,
|
||||
"src": "246:24:2",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 2538,
|
||||
"name": "IERC20Token",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 21127,
|
||||
"src": "246:11:2",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "219:52:2"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 2544,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 2543,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 2545,
|
||||
"src": "295:16:2",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
|
||||
"typeString": "address[]"
|
||||
},
|
||||
"typeName": {
|
||||
"baseType": {
|
||||
"id": 2541,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "295:7:2",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"id": 2542,
|
||||
"length": null,
|
||||
"nodeType": "ArrayTypeName",
|
||||
"src": "295:9:2",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
|
||||
"typeString": "address[]"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "294:18:2"
|
||||
},
|
||||
"scope": 2546,
|
||||
"src": "202:111:2",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 2547,
|
||||
"src": "164:151:2"
|
||||
}
|
||||
],
|
||||
"src": "51:265:2"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.662Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
4484
apps/cic-eth/tests/testdata/bancor/IConverter.json
vendored
4484
apps/cic-eth/tests/testdata/bancor/IConverter.json
vendored
File diff suppressed because one or more lines are too long
@ -1,296 +0,0 @@
|
||||
{
|
||||
"contractName": "IConverterAnchor",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "acceptOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "owner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "transferOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "contract IERC20Token",
|
||||
"name": "_token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "withdrawTokens",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":\"IConverterAnchor\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"../../utility/interfaces/IOwned.sol\";\nimport \"../../utility/interfaces/ITokenHolder.sol\";\n\n/*\n Converter Anchor interface\n*/\ninterface IConverterAnchor is IOwned, ITokenHolder {\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol",
|
||||
"exportedSymbols": {
|
||||
"IConverterAnchor": [
|
||||
13349
|
||||
]
|
||||
},
|
||||
"id": 13350,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 13342,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:16"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol",
|
||||
"file": "../../utility/interfaces/IOwned.sol",
|
||||
"id": 13343,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13350,
|
||||
"sourceUnit": 22848,
|
||||
"src": "75:45:16",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol",
|
||||
"file": "../../utility/interfaces/ITokenHolder.sol",
|
||||
"id": 13344,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13350,
|
||||
"sourceUnit": 22908,
|
||||
"src": "121:51:16",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [
|
||||
{
|
||||
"arguments": null,
|
||||
"baseName": {
|
||||
"contractScope": null,
|
||||
"id": 13345,
|
||||
"name": "IOwned",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 22847,
|
||||
"src": "241:6:16",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IOwned_$22847",
|
||||
"typeString": "contract IOwned"
|
||||
}
|
||||
},
|
||||
"id": 13346,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "241:6:16"
|
||||
},
|
||||
{
|
||||
"arguments": null,
|
||||
"baseName": {
|
||||
"contractScope": null,
|
||||
"id": 13347,
|
||||
"name": "ITokenHolder",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 22907,
|
||||
"src": "249:12:16",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_ITokenHolder_$22907",
|
||||
"typeString": "contract ITokenHolder"
|
||||
}
|
||||
},
|
||||
"id": 13348,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "249:12:16"
|
||||
}
|
||||
],
|
||||
"contractDependencies": [
|
||||
22847,
|
||||
22907
|
||||
],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 13349,
|
||||
"linearizedBaseContracts": [
|
||||
13349,
|
||||
22907,
|
||||
22847
|
||||
],
|
||||
"name": "IConverterAnchor",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [],
|
||||
"scope": 13350,
|
||||
"src": "211:54:16"
|
||||
}
|
||||
],
|
||||
"src": "51:215:16"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol",
|
||||
"exportedSymbols": {
|
||||
"IConverterAnchor": [
|
||||
13349
|
||||
]
|
||||
},
|
||||
"id": 13350,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 13342,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:16"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol",
|
||||
"file": "../../utility/interfaces/IOwned.sol",
|
||||
"id": 13343,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13350,
|
||||
"sourceUnit": 22848,
|
||||
"src": "75:45:16",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol",
|
||||
"file": "../../utility/interfaces/ITokenHolder.sol",
|
||||
"id": 13344,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13350,
|
||||
"sourceUnit": 22908,
|
||||
"src": "121:51:16",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [
|
||||
{
|
||||
"arguments": null,
|
||||
"baseName": {
|
||||
"contractScope": null,
|
||||
"id": 13345,
|
||||
"name": "IOwned",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 22847,
|
||||
"src": "241:6:16",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IOwned_$22847",
|
||||
"typeString": "contract IOwned"
|
||||
}
|
||||
},
|
||||
"id": 13346,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "241:6:16"
|
||||
},
|
||||
{
|
||||
"arguments": null,
|
||||
"baseName": {
|
||||
"contractScope": null,
|
||||
"id": 13347,
|
||||
"name": "ITokenHolder",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 22907,
|
||||
"src": "249:12:16",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_ITokenHolder_$22907",
|
||||
"typeString": "contract ITokenHolder"
|
||||
}
|
||||
},
|
||||
"id": 13348,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "249:12:16"
|
||||
}
|
||||
],
|
||||
"contractDependencies": [
|
||||
22847,
|
||||
22907
|
||||
],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 13349,
|
||||
"linearizedBaseContracts": [
|
||||
13349,
|
||||
22907,
|
||||
22847
|
||||
],
|
||||
"name": "IConverterAnchor",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [],
|
||||
"scope": 13350,
|
||||
"src": "211:54:16"
|
||||
}
|
||||
],
|
||||
"src": "51:215:16"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.744Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,372 +0,0 @@
|
||||
{
|
||||
"contractName": "IConverterUpgrader",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint16",
|
||||
"name": "_version",
|
||||
"type": "uint16"
|
||||
}
|
||||
],
|
||||
"name": "upgrade",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "_version",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"name": "upgrade",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_version\",\"type\":\"bytes32\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":\"IConverterUpgrader\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol\":{\"keccak256\":\"0x456faf61358bfd76498892509cc99f9729f310c9450e28b0d03b5e7cd9752802\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://01f7b3f24cc895a948ea44f8e067d312b55ef1e9cf491908f3fb948d02b914da\",\"dweb:/ipfs/QmfSwZrWFWmT8xeX3iwSq75Vs8pQaQBGkmxJEHehUiPP1N\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Converter Upgrader interface\n*/\ninterface IConverterUpgrader {\n function upgrade(bytes32 _version) external;\n function upgrade(uint16 _version) external;\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol",
|
||||
"exportedSymbols": {
|
||||
"IConverterUpgrader": [
|
||||
13660
|
||||
]
|
||||
},
|
||||
"id": 13661,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 13649,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:20"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 13660,
|
||||
"linearizedBaseContracts": [
|
||||
13660
|
||||
],
|
||||
"name": "IConverterUpgrader",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "bc444e13",
|
||||
"id": 13654,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "upgrade",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13652,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13651,
|
||||
"mutability": "mutable",
|
||||
"name": "_version",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13654,
|
||||
"src": "167:16:20",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13650,
|
||||
"name": "bytes32",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "167:7:20",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "166:18:20"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13653,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "193:0:20"
|
||||
},
|
||||
"scope": 13660,
|
||||
"src": "150:44:20",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "90f58c96",
|
||||
"id": 13659,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "upgrade",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13657,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13656,
|
||||
"mutability": "mutable",
|
||||
"name": "_version",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13659,
|
||||
"src": "216:15:20",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13655,
|
||||
"name": "uint16",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "216:6:20",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "215:17:20"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13658,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "241:0:20"
|
||||
},
|
||||
"scope": 13660,
|
||||
"src": "199:43:20",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 13661,
|
||||
"src": "115:129:20"
|
||||
}
|
||||
],
|
||||
"src": "51:194:20"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterUpgrader.sol",
|
||||
"exportedSymbols": {
|
||||
"IConverterUpgrader": [
|
||||
13660
|
||||
]
|
||||
},
|
||||
"id": 13661,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 13649,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:20"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 13660,
|
||||
"linearizedBaseContracts": [
|
||||
13660
|
||||
],
|
||||
"name": "IConverterUpgrader",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "bc444e13",
|
||||
"id": 13654,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "upgrade",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13652,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13651,
|
||||
"mutability": "mutable",
|
||||
"name": "_version",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13654,
|
||||
"src": "167:16:20",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13650,
|
||||
"name": "bytes32",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "167:7:20",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bytes32",
|
||||
"typeString": "bytes32"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "166:18:20"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13653,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "193:0:20"
|
||||
},
|
||||
"scope": 13660,
|
||||
"src": "150:44:20",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "90f58c96",
|
||||
"id": 13659,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "upgrade",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13657,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13656,
|
||||
"mutability": "mutable",
|
||||
"name": "_version",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13659,
|
||||
"src": "216:15:20",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13655,
|
||||
"name": "uint16",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "216:6:20",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "215:17:20"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13658,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "241:0:20"
|
||||
},
|
||||
"scope": 13660,
|
||||
"src": "199:43:20",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 13661,
|
||||
"src": "115:129:20"
|
||||
}
|
||||
],
|
||||
"src": "51:194:20"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.747Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
1914
apps/cic-eth/tests/testdata/bancor/IERC20Token.json
vendored
1914
apps/cic-eth/tests/testdata/bancor/IERC20Token.json
vendored
File diff suppressed because it is too large
Load Diff
869
apps/cic-eth/tests/testdata/bancor/IEtherToken.json
vendored
869
apps/cic-eth/tests/testdata/bancor/IEtherToken.json
vendored
@ -1,869 +0,0 @@
|
||||
{
|
||||
"contractName": "IEtherToken",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_owner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_spender",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "allowance",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_spender",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "approve",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_owner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "balanceOf",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "decimals",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint8",
|
||||
"name": "",
|
||||
"type": "uint8"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "name",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "symbol",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "totalSupply",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "transfer",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "transferFrom",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "deposit",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "withdraw",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "depositTo",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address payable",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "withdrawTo",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"depositTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":\"IEtherToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol\":{\"keccak256\":\"0x6ed324da616d70af0b21fa073b1e5329b430e38b470177633a69710eff3da893\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://44f94aa59c67de636423cbdef82efb7d8e0562e73dfc9049a48054156aebaf14\",\"dweb:/ipfs/Qmdn8KAP54s7X3J6TCoZPhCpS19aCQzFYZuFABugJ5JA5D\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IERC20Token.sol\";\n\n/*\n Ether Token interface\n*/\ninterface IEtherToken is IERC20Token {\n function deposit() external payable;\n function withdraw(uint256 _amount) external;\n function depositTo(address _to) external payable;\n function withdrawTo(address payable _to, uint256 _amount) external;\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol",
|
||||
"exportedSymbols": {
|
||||
"IEtherToken": [
|
||||
21153
|
||||
]
|
||||
},
|
||||
"id": 21154,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 21129,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:52"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
|
||||
"file": "./IERC20Token.sol",
|
||||
"id": 21130,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 21154,
|
||||
"sourceUnit": 21128,
|
||||
"src": "75:27:52",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [
|
||||
{
|
||||
"arguments": null,
|
||||
"baseName": {
|
||||
"contractScope": null,
|
||||
"id": 21131,
|
||||
"name": "IERC20Token",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 21127,
|
||||
"src": "161:11:52",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
}
|
||||
},
|
||||
"id": 21132,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "161:11:52"
|
||||
}
|
||||
],
|
||||
"contractDependencies": [
|
||||
21127
|
||||
],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 21153,
|
||||
"linearizedBaseContracts": [
|
||||
21153,
|
||||
21127
|
||||
],
|
||||
"name": "IEtherToken",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "d0e30db0",
|
||||
"id": 21135,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "deposit",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 21133,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "195:2:52"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21134,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "214:0:52"
|
||||
},
|
||||
"scope": 21153,
|
||||
"src": "179:36:52",
|
||||
"stateMutability": "payable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "2e1a7d4d",
|
||||
"id": 21140,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "withdraw",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 21138,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21137,
|
||||
"mutability": "mutable",
|
||||
"name": "_amount",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21140,
|
||||
"src": "238:15:52",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21136,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "238:7:52",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "237:17:52"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21139,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "263:0:52"
|
||||
},
|
||||
"scope": 21153,
|
||||
"src": "220:44:52",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "b760faf9",
|
||||
"id": 21145,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "depositTo",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 21143,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21142,
|
||||
"mutability": "mutable",
|
||||
"name": "_to",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21145,
|
||||
"src": "288:11:52",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21141,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "288:7:52",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "287:13:52"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21144,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "317:0:52"
|
||||
},
|
||||
"scope": 21153,
|
||||
"src": "269:49:52",
|
||||
"stateMutability": "payable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "205c2878",
|
||||
"id": 21152,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "withdrawTo",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 21150,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21147,
|
||||
"mutability": "mutable",
|
||||
"name": "_to",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21152,
|
||||
"src": "343:19:52",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address_payable",
|
||||
"typeString": "address payable"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21146,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "343:15:52",
|
||||
"stateMutability": "payable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address_payable",
|
||||
"typeString": "address payable"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21149,
|
||||
"mutability": "mutable",
|
||||
"name": "_amount",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21152,
|
||||
"src": "364:15:52",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21148,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "364:7:52",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "342:38:52"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21151,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "389:0:52"
|
||||
},
|
||||
"scope": 21153,
|
||||
"src": "323:67:52",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 21154,
|
||||
"src": "136:256:52"
|
||||
}
|
||||
],
|
||||
"src": "51:342:52"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IEtherToken.sol",
|
||||
"exportedSymbols": {
|
||||
"IEtherToken": [
|
||||
21153
|
||||
]
|
||||
},
|
||||
"id": 21154,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 21129,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:52"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
|
||||
"file": "./IERC20Token.sol",
|
||||
"id": 21130,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 21154,
|
||||
"sourceUnit": 21128,
|
||||
"src": "75:27:52",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [
|
||||
{
|
||||
"arguments": null,
|
||||
"baseName": {
|
||||
"contractScope": null,
|
||||
"id": 21131,
|
||||
"name": "IERC20Token",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 21127,
|
||||
"src": "161:11:52",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
}
|
||||
},
|
||||
"id": 21132,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "161:11:52"
|
||||
}
|
||||
],
|
||||
"contractDependencies": [
|
||||
21127
|
||||
],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 21153,
|
||||
"linearizedBaseContracts": [
|
||||
21153,
|
||||
21127
|
||||
],
|
||||
"name": "IEtherToken",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "d0e30db0",
|
||||
"id": 21135,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "deposit",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 21133,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "195:2:52"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21134,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "214:0:52"
|
||||
},
|
||||
"scope": 21153,
|
||||
"src": "179:36:52",
|
||||
"stateMutability": "payable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "2e1a7d4d",
|
||||
"id": 21140,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "withdraw",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 21138,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21137,
|
||||
"mutability": "mutable",
|
||||
"name": "_amount",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21140,
|
||||
"src": "238:15:52",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21136,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "238:7:52",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "237:17:52"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21139,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "263:0:52"
|
||||
},
|
||||
"scope": 21153,
|
||||
"src": "220:44:52",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "b760faf9",
|
||||
"id": 21145,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "depositTo",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 21143,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21142,
|
||||
"mutability": "mutable",
|
||||
"name": "_to",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21145,
|
||||
"src": "288:11:52",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21141,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "288:7:52",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "287:13:52"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21144,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "317:0:52"
|
||||
},
|
||||
"scope": 21153,
|
||||
"src": "269:49:52",
|
||||
"stateMutability": "payable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "205c2878",
|
||||
"id": 21152,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "withdrawTo",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 21150,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21147,
|
||||
"mutability": "mutable",
|
||||
"name": "_to",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21152,
|
||||
"src": "343:19:52",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address_payable",
|
||||
"typeString": "address payable"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21146,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "343:15:52",
|
||||
"stateMutability": "payable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address_payable",
|
||||
"typeString": "address payable"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 21149,
|
||||
"mutability": "mutable",
|
||||
"name": "_amount",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 21152,
|
||||
"src": "364:15:52",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 21148,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "364:7:52",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "342:38:52"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 21151,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "389:0:52"
|
||||
},
|
||||
"scope": 21153,
|
||||
"src": "323:67:52",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 21154,
|
||||
"src": "136:256:52"
|
||||
}
|
||||
],
|
||||
"src": "51:342:52"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.836Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
55374
apps/cic-eth/tests/testdata/bancor/ILegacyConverter.json
vendored
55374
apps/cic-eth/tests/testdata/bancor/ILegacyConverter.json
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
441
apps/cic-eth/tests/testdata/bancor/IOwned.json
vendored
441
apps/cic-eth/tests/testdata/bancor/IOwned.json
vendored
@ -1,441 +0,0 @@
|
||||
{
|
||||
"contractName": "IOwned",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "owner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "transferOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "acceptOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":\"IOwned\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Owned contract interface\n*/\ninterface IOwned {\n // this function isn't since the compiler emits automatically generated getter functions as external\n function owner() external view returns (address);\n\n function transferOwnership(address _newOwner) external;\n function acceptOwnership() external;\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol",
|
||||
"exportedSymbols": {
|
||||
"IOwned": [
|
||||
22847
|
||||
]
|
||||
},
|
||||
"id": 22848,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 22833,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:68"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 22847,
|
||||
"linearizedBaseContracts": [
|
||||
22847
|
||||
],
|
||||
"name": "IOwned",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "8da5cb5b",
|
||||
"id": 22838,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "owner",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22834,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "253:2:68"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22837,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22836,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22838,
|
||||
"src": "279:7:68",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22835,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "279:7:68",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "278:9:68"
|
||||
},
|
||||
"scope": 22847,
|
||||
"src": "239:49:68",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "f2fde38b",
|
||||
"id": 22843,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "transferOwnership",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22841,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22840,
|
||||
"mutability": "mutable",
|
||||
"name": "_newOwner",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22843,
|
||||
"src": "321:17:68",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22839,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "321:7:68",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "320:19:68"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22842,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "348:0:68"
|
||||
},
|
||||
"scope": 22847,
|
||||
"src": "294:55:68",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "79ba5097",
|
||||
"id": 22846,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "acceptOwnership",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22844,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "378:2:68"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22845,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "389:0:68"
|
||||
},
|
||||
"scope": 22847,
|
||||
"src": "354:36:68",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 22848,
|
||||
"src": "111:281:68"
|
||||
}
|
||||
],
|
||||
"src": "51:342:68"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol",
|
||||
"exportedSymbols": {
|
||||
"IOwned": [
|
||||
22847
|
||||
]
|
||||
},
|
||||
"id": 22848,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 22833,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:68"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 22847,
|
||||
"linearizedBaseContracts": [
|
||||
22847
|
||||
],
|
||||
"name": "IOwned",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "8da5cb5b",
|
||||
"id": 22838,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "owner",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22834,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "253:2:68"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22837,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22836,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22838,
|
||||
"src": "279:7:68",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22835,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "279:7:68",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "278:9:68"
|
||||
},
|
||||
"scope": 22847,
|
||||
"src": "239:49:68",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "f2fde38b",
|
||||
"id": 22843,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "transferOwnership",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22841,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22840,
|
||||
"mutability": "mutable",
|
||||
"name": "_newOwner",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22843,
|
||||
"src": "321:17:68",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22839,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "321:7:68",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "320:19:68"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22842,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "348:0:68"
|
||||
},
|
||||
"scope": 22847,
|
||||
"src": "294:55:68",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "79ba5097",
|
||||
"id": 22846,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "acceptOwnership",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22844,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "378:2:68"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22845,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "389:0:68"
|
||||
},
|
||||
"scope": 22847,
|
||||
"src": "354:36:68",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 22848,
|
||||
"src": "111:281:68"
|
||||
}
|
||||
],
|
||||
"src": "51:342:68"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.850Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
1260
apps/cic-eth/tests/testdata/bancor/IPriceOracle.json
vendored
1260
apps/cic-eth/tests/testdata/bancor/IPriceOracle.json
vendored
File diff suppressed because it is too large
Load Diff
1013
apps/cic-eth/tests/testdata/bancor/ISmartToken.json
vendored
1013
apps/cic-eth/tests/testdata/bancor/ISmartToken.json
vendored
File diff suppressed because one or more lines are too long
492
apps/cic-eth/tests/testdata/bancor/ITokenHolder.json
vendored
492
apps/cic-eth/tests/testdata/bancor/ITokenHolder.json
vendored
@ -1,492 +0,0 @@
|
||||
{
|
||||
"contractName": "ITokenHolder",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "acceptOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "owner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "transferOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "contract IERC20Token",
|
||||
"name": "_token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "withdrawTokens",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Token\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":\"ITokenHolder\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IOwned.sol\";\nimport \"../../token/interfaces/IERC20Token.sol\";\n\n/*\n Token Holder interface\n*/\ninterface ITokenHolder is IOwned {\n function withdrawTokens(IERC20Token _token, address _to, uint256 _amount) external;\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol",
|
||||
"exportedSymbols": {
|
||||
"ITokenHolder": [
|
||||
22907
|
||||
]
|
||||
},
|
||||
"id": 22908,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 22893,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:70"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol",
|
||||
"file": "./IOwned.sol",
|
||||
"id": 22894,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 22908,
|
||||
"sourceUnit": 22848,
|
||||
"src": "75:22:70",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
|
||||
"file": "../../token/interfaces/IERC20Token.sol",
|
||||
"id": 22895,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 22908,
|
||||
"sourceUnit": 21128,
|
||||
"src": "98:48:70",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [
|
||||
{
|
||||
"arguments": null,
|
||||
"baseName": {
|
||||
"contractScope": null,
|
||||
"id": 22896,
|
||||
"name": "IOwned",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 22847,
|
||||
"src": "207:6:70",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IOwned_$22847",
|
||||
"typeString": "contract IOwned"
|
||||
}
|
||||
},
|
||||
"id": 22897,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "207:6:70"
|
||||
}
|
||||
],
|
||||
"contractDependencies": [
|
||||
22847
|
||||
],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 22907,
|
||||
"linearizedBaseContracts": [
|
||||
22907,
|
||||
22847
|
||||
],
|
||||
"name": "ITokenHolder",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "5e35359e",
|
||||
"id": 22906,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "withdrawTokens",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22904,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22899,
|
||||
"mutability": "mutable",
|
||||
"name": "_token",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22906,
|
||||
"src": "244:18:70",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 22898,
|
||||
"name": "IERC20Token",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 21127,
|
||||
"src": "244:11:70",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22901,
|
||||
"mutability": "mutable",
|
||||
"name": "_to",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22906,
|
||||
"src": "264:11:70",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22900,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "264:7:70",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22903,
|
||||
"mutability": "mutable",
|
||||
"name": "_amount",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22906,
|
||||
"src": "277:15:70",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22902,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "277:7:70",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "243:50:70"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22905,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "302:0:70"
|
||||
},
|
||||
"scope": 22907,
|
||||
"src": "220:83:70",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 22908,
|
||||
"src": "181:124:70"
|
||||
}
|
||||
],
|
||||
"src": "51:255:70"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol",
|
||||
"exportedSymbols": {
|
||||
"ITokenHolder": [
|
||||
22907
|
||||
]
|
||||
},
|
||||
"id": 22908,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 22893,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:70"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol",
|
||||
"file": "./IOwned.sol",
|
||||
"id": 22894,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 22908,
|
||||
"sourceUnit": 22848,
|
||||
"src": "75:22:70",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol",
|
||||
"file": "../../token/interfaces/IERC20Token.sol",
|
||||
"id": 22895,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 22908,
|
||||
"sourceUnit": 21128,
|
||||
"src": "98:48:70",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [
|
||||
{
|
||||
"arguments": null,
|
||||
"baseName": {
|
||||
"contractScope": null,
|
||||
"id": 22896,
|
||||
"name": "IOwned",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 22847,
|
||||
"src": "207:6:70",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IOwned_$22847",
|
||||
"typeString": "contract IOwned"
|
||||
}
|
||||
},
|
||||
"id": 22897,
|
||||
"nodeType": "InheritanceSpecifier",
|
||||
"src": "207:6:70"
|
||||
}
|
||||
],
|
||||
"contractDependencies": [
|
||||
22847
|
||||
],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 22907,
|
||||
"linearizedBaseContracts": [
|
||||
22907,
|
||||
22847
|
||||
],
|
||||
"name": "ITokenHolder",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "5e35359e",
|
||||
"id": 22906,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "withdrawTokens",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22904,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22899,
|
||||
"mutability": "mutable",
|
||||
"name": "_token",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22906,
|
||||
"src": "244:18:70",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 22898,
|
||||
"name": "IERC20Token",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 21127,
|
||||
"src": "244:11:70",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IERC20Token_$21127",
|
||||
"typeString": "contract IERC20Token"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22901,
|
||||
"mutability": "mutable",
|
||||
"name": "_to",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22906,
|
||||
"src": "264:11:70",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22900,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "264:7:70",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22903,
|
||||
"mutability": "mutable",
|
||||
"name": "_amount",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22906,
|
||||
"src": "277:15:70",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22902,
|
||||
"name": "uint256",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "277:7:70",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint256",
|
||||
"typeString": "uint256"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "243:50:70"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22905,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "302:0:70"
|
||||
},
|
||||
"scope": 22907,
|
||||
"src": "220:83:70",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 22908,
|
||||
"src": "181:124:70"
|
||||
}
|
||||
],
|
||||
"src": "51:255:70"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.850Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
@ -1,584 +0,0 @@
|
||||
{
|
||||
"contractName": "ITypedConverterAnchorFactory",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "converterType",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint16",
|
||||
"name": "",
|
||||
"type": "uint16"
|
||||
}
|
||||
],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "_name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "_symbol",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"internalType": "uint8",
|
||||
"name": "_decimals",
|
||||
"type": "uint8"
|
||||
}
|
||||
],
|
||||
"name": "createAnchor",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract IConverterAnchor",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"name\":\"createAnchor\",\"outputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol\":\"ITypedConverterAnchorFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol\":{\"keccak256\":\"0x33bbe6f5f485bfec1a21a1da83cf9044e6f320d075a3ee942886653537cc5fe9\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://7fd8f0b7c8edaf6c0d38fbef3b7a72ad02e7d228cc6a8717c094e0b6dc099d09\",\"dweb:/ipfs/QmXdT9GtrbUryT1Wxf2xnRtUXNVcKqFUDe8BwpPKcYacmo\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IConverterAnchor.sol\";\n\n/*\n Typed Converter Anchor Factory interface\n*/\ninterface ITypedConverterAnchorFactory {\n function converterType() external pure returns (uint16);\n function createAnchor(string memory _name, string memory _symbol, uint8 _decimals) external returns (IConverterAnchor);\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol",
|
||||
"exportedSymbols": {
|
||||
"ITypedConverterAnchorFactory": [
|
||||
13680
|
||||
]
|
||||
},
|
||||
"id": 13681,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 13662,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:21"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol",
|
||||
"file": "./IConverterAnchor.sol",
|
||||
"id": 13663,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13681,
|
||||
"sourceUnit": 13350,
|
||||
"src": "75:32:21",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 13680,
|
||||
"linearizedBaseContracts": [
|
||||
13680
|
||||
],
|
||||
"name": "ITypedConverterAnchorFactory",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "3e8ff43f",
|
||||
"id": 13668,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "converterType",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13664,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "227:2:21"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13667,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13666,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13668,
|
||||
"src": "253:6:21",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13665,
|
||||
"name": "uint16",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "253:6:21",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "252:8:21"
|
||||
},
|
||||
"scope": 13680,
|
||||
"src": "205:56:21",
|
||||
"stateMutability": "pure",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "a9fd4a2a",
|
||||
"id": 13679,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "createAnchor",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13675,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13670,
|
||||
"mutability": "mutable",
|
||||
"name": "_name",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13679,
|
||||
"src": "288:19:21",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_string_memory_ptr",
|
||||
"typeString": "string"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13669,
|
||||
"name": "string",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "288:6:21",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_string_storage_ptr",
|
||||
"typeString": "string"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13672,
|
||||
"mutability": "mutable",
|
||||
"name": "_symbol",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13679,
|
||||
"src": "309:21:21",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_string_memory_ptr",
|
||||
"typeString": "string"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13671,
|
||||
"name": "string",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "309:6:21",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_string_storage_ptr",
|
||||
"typeString": "string"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13674,
|
||||
"mutability": "mutable",
|
||||
"name": "_decimals",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13679,
|
||||
"src": "332:15:21",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint8",
|
||||
"typeString": "uint8"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13673,
|
||||
"name": "uint8",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "332:5:21",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint8",
|
||||
"typeString": "uint8"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "287:61:21"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13678,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13677,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13679,
|
||||
"src": "367:16:21",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
|
||||
"typeString": "contract IConverterAnchor"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 13676,
|
||||
"name": "IConverterAnchor",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 13349,
|
||||
"src": "367:16:21",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
|
||||
"typeString": "contract IConverterAnchor"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "366:18:21"
|
||||
},
|
||||
"scope": 13680,
|
||||
"src": "266:119:21",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 13681,
|
||||
"src": "160:227:21"
|
||||
}
|
||||
],
|
||||
"src": "51:337:21"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterAnchorFactory.sol",
|
||||
"exportedSymbols": {
|
||||
"ITypedConverterAnchorFactory": [
|
||||
13680
|
||||
]
|
||||
},
|
||||
"id": 13681,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 13662,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:21"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol",
|
||||
"file": "./IConverterAnchor.sol",
|
||||
"id": 13663,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13681,
|
||||
"sourceUnit": 13350,
|
||||
"src": "75:32:21",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 13680,
|
||||
"linearizedBaseContracts": [
|
||||
13680
|
||||
],
|
||||
"name": "ITypedConverterAnchorFactory",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "3e8ff43f",
|
||||
"id": 13668,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "converterType",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13664,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "227:2:21"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13667,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13666,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13668,
|
||||
"src": "253:6:21",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13665,
|
||||
"name": "uint16",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "253:6:21",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "252:8:21"
|
||||
},
|
||||
"scope": 13680,
|
||||
"src": "205:56:21",
|
||||
"stateMutability": "pure",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "a9fd4a2a",
|
||||
"id": 13679,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "createAnchor",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13675,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13670,
|
||||
"mutability": "mutable",
|
||||
"name": "_name",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13679,
|
||||
"src": "288:19:21",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_string_memory_ptr",
|
||||
"typeString": "string"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13669,
|
||||
"name": "string",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "288:6:21",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_string_storage_ptr",
|
||||
"typeString": "string"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13672,
|
||||
"mutability": "mutable",
|
||||
"name": "_symbol",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13679,
|
||||
"src": "309:21:21",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "memory",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_string_memory_ptr",
|
||||
"typeString": "string"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13671,
|
||||
"name": "string",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "309:6:21",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_string_storage_ptr",
|
||||
"typeString": "string"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13674,
|
||||
"mutability": "mutable",
|
||||
"name": "_decimals",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13679,
|
||||
"src": "332:15:21",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint8",
|
||||
"typeString": "uint8"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13673,
|
||||
"name": "uint8",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "332:5:21",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint8",
|
||||
"typeString": "uint8"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "287:61:21"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13678,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13677,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13679,
|
||||
"src": "367:16:21",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
|
||||
"typeString": "contract IConverterAnchor"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 13676,
|
||||
"name": "IConverterAnchor",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 13349,
|
||||
"src": "367:16:21",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
|
||||
"typeString": "contract IConverterAnchor"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "366:18:21"
|
||||
},
|
||||
"scope": 13680,
|
||||
"src": "266:119:21",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 13681,
|
||||
"src": "160:227:21"
|
||||
}
|
||||
],
|
||||
"src": "51:337:21"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.747Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
@ -1,243 +0,0 @@
|
||||
{
|
||||
"contractName": "ITypedConverterCustomFactory",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "converterType",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint16",
|
||||
"name": "",
|
||||
"type": "uint16"
|
||||
}
|
||||
],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":\"ITypedConverterCustomFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol\":{\"keccak256\":\"0xe9e91f22d45e1c39dd441bed511d5fa6acffe83910f42ea7abcfd300f59daaaf\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://621881bd2a74632b697d87e4c3253142f8758364122240d5cc18826b18bfef80\",\"dweb:/ipfs/QmcTPevgXAYM7Li4r3rKn8uqRF2hWpid2uNBwymysYjLWp\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Typed Converter Custom Factory interface\n*/\ninterface ITypedConverterCustomFactory {\n function converterType() external pure returns (uint16);\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol",
|
||||
"exportedSymbols": {
|
||||
"ITypedConverterCustomFactory": [
|
||||
13688
|
||||
]
|
||||
},
|
||||
"id": 13689,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 13682,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:22"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 13688,
|
||||
"linearizedBaseContracts": [
|
||||
13688
|
||||
],
|
||||
"name": "ITypedConverterCustomFactory",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "3e8ff43f",
|
||||
"id": 13687,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "converterType",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13683,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "194:2:22"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13686,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13685,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13687,
|
||||
"src": "220:6:22",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13684,
|
||||
"name": "uint16",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "220:6:22",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "219:8:22"
|
||||
},
|
||||
"scope": 13688,
|
||||
"src": "172:56:22",
|
||||
"stateMutability": "pure",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 13689,
|
||||
"src": "127:103:22"
|
||||
}
|
||||
],
|
||||
"src": "51:180:22"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterCustomFactory.sol",
|
||||
"exportedSymbols": {
|
||||
"ITypedConverterCustomFactory": [
|
||||
13688
|
||||
]
|
||||
},
|
||||
"id": 13689,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 13682,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:22"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 13688,
|
||||
"linearizedBaseContracts": [
|
||||
13688
|
||||
],
|
||||
"name": "ITypedConverterCustomFactory",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "3e8ff43f",
|
||||
"id": 13687,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "converterType",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13683,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "194:2:22"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13686,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13685,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13687,
|
||||
"src": "220:6:22",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13684,
|
||||
"name": "uint16",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "220:6:22",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "219:8:22"
|
||||
},
|
||||
"scope": 13688,
|
||||
"src": "172:56:22",
|
||||
"stateMutability": "pure",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 13689,
|
||||
"src": "127:103:22"
|
||||
}
|
||||
],
|
||||
"src": "51:180:22"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.747Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
@ -1,636 +0,0 @@
|
||||
{
|
||||
"contractName": "ITypedConverterFactory",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "converterType",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint16",
|
||||
"name": "",
|
||||
"type": "uint16"
|
||||
}
|
||||
],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "contract IConverterAnchor",
|
||||
"name": "_anchor",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "contract IContractRegistry",
|
||||
"name": "_registry",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint32",
|
||||
"name": "_maxConversionFee",
|
||||
"type": "uint32"
|
||||
}
|
||||
],
|
||||
"name": "createConverter",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract IConverter",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"converterType\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IConverterAnchor\",\"name\":\"_anchor\",\"type\":\"address\"},{\"internalType\":\"contract IContractRegistry\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_maxConversionFee\",\"type\":\"uint32\"}],\"name\":\"createConverter\",\"outputs\":[{\"internalType\":\"contract IConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol\":\"ITypedConverterFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol\":{\"keccak256\":\"0x18b0d73a3d5ee951ede1b3f840ed35b40570e34975703079a4451555f4dd089b\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1cd7263f1ef60793e3929509150420037df9a1194c3d0f40bb2ff5516d6a373f\",\"dweb:/ipfs/QmNUbsZt2rzWPjStYycgz3vMbNP4VrAqZPRAK39QNqUoos\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol\":{\"keccak256\":\"0x9448cdbe90293fb5c1a0808b77af8754a1025b59c45f432eee01f659361a6115\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://1ef2bb2e1543c9324daf7f3fd086a57efb45b89f3d62b9d7a9fc78c138d24dbc\",\"dweb:/ipfs/QmVcXDib3K6xYJMBNxawmo4krJGiDfxb5oL64Lc3pi14XK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol\":{\"keccak256\":\"0xe82abff9b17574a0ac6ec6b97d192b2a31fd85d465fba99f942852921134d1be\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://5e9622922c6f24fbfb7f0730b74baba78e9a508e11ceefd693fbb295d8c1cc61\",\"dweb:/ipfs/QmYbatGXAE3pkqMMcK2eBCBa1F7ndSd9SYfH9HhkRSLmtK\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol\":{\"keccak256\":\"0xe6f988c3156e88258474526a541d5a42b6a9adae98b04177a059d9f723bc82cd\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9a6eb77a5b9ce70995a11a6e48ac3985a4c70896fe5fe04d46146ad7c1c83ea3\",\"dweb:/ipfs/QmYvGSveZFG51tghwkVuu6eK9Jy8frHpfLxHTMyvNZN461\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol\":{\"keccak256\":\"0x3551889a83738b621c29ed66f1ecb6a843cca4217e54c9357198559b9cc92259\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://231a59c8f2665adeda8c7e6930832409c9b991fd27ad84b3a24335e7bf269bbe\",\"dweb:/ipfs/QmeJJbn1EAUbZenruTEdJAnwUn3dxsVNeJvxPe81qKEGqL\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol\":{\"keccak256\":\"0xc60a9d197abc28c1906ed4d18b59caa0242db754a0e1f67af6e6277593530dae\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://a8c6f3e6525a81a5165ccbf04f73f6c389c14b74135d11a7b5f70b1c9bdac75c\",\"dweb:/ipfs/QmaPu4Z7yUPc9sMADmoTZVY6AnyDSYHtNNCx3mm4VkJwhP\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol\":{\"keccak256\":\"0x9ccb8ab04d0bd874ba7aae5277e60f35c36918922649a0596bf3664ed257bfe2\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://b65e6db19cd244c9f3545695de5fd7573711c49fb306631ddbf0e1d2fa9fb589\",\"dweb:/ipfs/QmZeu5KYVMTbTx7h2BVUq52fpwL9Q44AUfzeVksucDohgf\"]},\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\nimport \"./IConverter.sol\";\nimport \"./IConverterAnchor.sol\";\nimport \"../../utility/interfaces/IContractRegistry.sol\";\n\n/*\n Typed Converter Factory interface\n*/\ninterface ITypedConverterFactory {\n function converterType() external pure returns (uint16);\n function createConverter(IConverterAnchor _anchor, IContractRegistry _registry, uint32 _maxConversionFee) external returns (IConverter);\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol",
|
||||
"exportedSymbols": {
|
||||
"ITypedConverterFactory": [
|
||||
13710
|
||||
]
|
||||
},
|
||||
"id": 13711,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 13690,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:23"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol",
|
||||
"file": "./IConverter.sol",
|
||||
"id": 13691,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13711,
|
||||
"sourceUnit": 13341,
|
||||
"src": "75:26:23",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol",
|
||||
"file": "./IConverterAnchor.sol",
|
||||
"id": 13692,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13711,
|
||||
"sourceUnit": 13350,
|
||||
"src": "102:32:23",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol",
|
||||
"file": "../../utility/interfaces/IContractRegistry.sol",
|
||||
"id": 13693,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13711,
|
||||
"sourceUnit": 22832,
|
||||
"src": "135:56:23",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 13710,
|
||||
"linearizedBaseContracts": [
|
||||
13710
|
||||
],
|
||||
"name": "ITypedConverterFactory",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "3e8ff43f",
|
||||
"id": 13698,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "converterType",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13694,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "298:2:23"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13697,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13696,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13698,
|
||||
"src": "324:6:23",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13695,
|
||||
"name": "uint16",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "324:6:23",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "323:8:23"
|
||||
},
|
||||
"scope": 13710,
|
||||
"src": "276:56:23",
|
||||
"stateMutability": "pure",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "11413958",
|
||||
"id": 13709,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "createConverter",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13705,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13700,
|
||||
"mutability": "mutable",
|
||||
"name": "_anchor",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13709,
|
||||
"src": "362:24:23",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
|
||||
"typeString": "contract IConverterAnchor"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 13699,
|
||||
"name": "IConverterAnchor",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 13349,
|
||||
"src": "362:16:23",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
|
||||
"typeString": "contract IConverterAnchor"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13702,
|
||||
"mutability": "mutable",
|
||||
"name": "_registry",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13709,
|
||||
"src": "388:27:23",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
|
||||
"typeString": "contract IContractRegistry"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 13701,
|
||||
"name": "IContractRegistry",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 22831,
|
||||
"src": "388:17:23",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
|
||||
"typeString": "contract IContractRegistry"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13704,
|
||||
"mutability": "mutable",
|
||||
"name": "_maxConversionFee",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13709,
|
||||
"src": "417:24:23",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint32",
|
||||
"typeString": "uint32"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13703,
|
||||
"name": "uint32",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "417:6:23",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint32",
|
||||
"typeString": "uint32"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "361:81:23"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13708,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13707,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13709,
|
||||
"src": "461:10:23",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverter_$13340",
|
||||
"typeString": "contract IConverter"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 13706,
|
||||
"name": "IConverter",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 13340,
|
||||
"src": "461:10:23",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverter_$13340",
|
||||
"typeString": "contract IConverter"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "460:12:23"
|
||||
},
|
||||
"scope": 13710,
|
||||
"src": "337:136:23",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 13711,
|
||||
"src": "237:238:23"
|
||||
}
|
||||
],
|
||||
"src": "51:425:23"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/ITypedConverterFactory.sol",
|
||||
"exportedSymbols": {
|
||||
"ITypedConverterFactory": [
|
||||
13710
|
||||
]
|
||||
},
|
||||
"id": 13711,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 13690,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:23"
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverter.sol",
|
||||
"file": "./IConverter.sol",
|
||||
"id": 13691,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13711,
|
||||
"sourceUnit": 13341,
|
||||
"src": "75:26:23",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/converter/interfaces/IConverterAnchor.sol",
|
||||
"file": "./IConverterAnchor.sol",
|
||||
"id": 13692,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13711,
|
||||
"sourceUnit": 13350,
|
||||
"src": "102:32:23",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IContractRegistry.sol",
|
||||
"file": "../../utility/interfaces/IContractRegistry.sol",
|
||||
"id": 13693,
|
||||
"nodeType": "ImportDirective",
|
||||
"scope": 13711,
|
||||
"sourceUnit": 22832,
|
||||
"src": "135:56:23",
|
||||
"symbolAliases": [],
|
||||
"unitAlias": ""
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 13710,
|
||||
"linearizedBaseContracts": [
|
||||
13710
|
||||
],
|
||||
"name": "ITypedConverterFactory",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "3e8ff43f",
|
||||
"id": 13698,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "converterType",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13694,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [],
|
||||
"src": "298:2:23"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13697,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13696,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13698,
|
||||
"src": "324:6:23",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13695,
|
||||
"name": "uint16",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "324:6:23",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint16",
|
||||
"typeString": "uint16"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "323:8:23"
|
||||
},
|
||||
"scope": 13710,
|
||||
"src": "276:56:23",
|
||||
"stateMutability": "pure",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
},
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "11413958",
|
||||
"id": 13709,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "createConverter",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 13705,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13700,
|
||||
"mutability": "mutable",
|
||||
"name": "_anchor",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13709,
|
||||
"src": "362:24:23",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
|
||||
"typeString": "contract IConverterAnchor"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 13699,
|
||||
"name": "IConverterAnchor",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 13349,
|
||||
"src": "362:16:23",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverterAnchor_$13349",
|
||||
"typeString": "contract IConverterAnchor"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13702,
|
||||
"mutability": "mutable",
|
||||
"name": "_registry",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13709,
|
||||
"src": "388:27:23",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
|
||||
"typeString": "contract IContractRegistry"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 13701,
|
||||
"name": "IContractRegistry",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 22831,
|
||||
"src": "388:17:23",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IContractRegistry_$22831",
|
||||
"typeString": "contract IContractRegistry"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13704,
|
||||
"mutability": "mutable",
|
||||
"name": "_maxConversionFee",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13709,
|
||||
"src": "417:24:23",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint32",
|
||||
"typeString": "uint32"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 13703,
|
||||
"name": "uint32",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "417:6:23",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_uint32",
|
||||
"typeString": "uint32"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "361:81:23"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 13708,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 13707,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 13709,
|
||||
"src": "461:10:23",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverter_$13340",
|
||||
"typeString": "contract IConverter"
|
||||
},
|
||||
"typeName": {
|
||||
"contractScope": null,
|
||||
"id": 13706,
|
||||
"name": "IConverter",
|
||||
"nodeType": "UserDefinedTypeName",
|
||||
"referencedDeclaration": 13340,
|
||||
"src": "461:10:23",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_contract$_IConverter_$13340",
|
||||
"typeString": "contract IConverter"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "460:12:23"
|
||||
},
|
||||
"scope": 13710,
|
||||
"src": "337:136:23",
|
||||
"stateMutability": "nonpayable",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 13711,
|
||||
"src": "237:238:23"
|
||||
}
|
||||
],
|
||||
"src": "51:425:23"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.747Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
309
apps/cic-eth/tests/testdata/bancor/IWhitelist.json
vendored
309
apps/cic-eth/tests/testdata/bancor/IWhitelist.json
vendored
@ -1,309 +0,0 @@
|
||||
{
|
||||
"contractName": "IWhitelist",
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_address",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "isWhitelisted",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"isWhitelisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":\"IWhitelist\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol\":{\"keccak256\":\"0x356ad553ceeaea04d7cb8f0d6a5663c47dfccb2bd82517348128f032416ee34a\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://9ea3bbb9945144ead2c1392351f2f9f7444af78569f2b95da2e68bb6b919db52\",\"dweb:/ipfs/QmPyUAk44Kj7nJB4tzYqeSXWHyYP51mRNynEmWra9m4eKS\"]}},\"version\":1}",
|
||||
"bytecode": "0x",
|
||||
"deployedBytecode": "0x",
|
||||
"immutableReferences": {},
|
||||
"sourceMap": "",
|
||||
"deployedSourceMap": "",
|
||||
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\npragma solidity 0.6.12;\n\n/*\n Whitelist interface\n*/\ninterface IWhitelist {\n function isWhitelisted(address _address) external view returns (bool);\n}\n",
|
||||
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol",
|
||||
"ast": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol",
|
||||
"exportedSymbols": {
|
||||
"IWhitelist": [
|
||||
22917
|
||||
]
|
||||
},
|
||||
"id": 22918,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 22909,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:71"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 22917,
|
||||
"linearizedBaseContracts": [
|
||||
22917
|
||||
],
|
||||
"name": "IWhitelist",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "3af32abf",
|
||||
"id": 22916,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "isWhitelisted",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22912,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22911,
|
||||
"mutability": "mutable",
|
||||
"name": "_address",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22916,
|
||||
"src": "156:16:71",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22910,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "156:7:71",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "155:18:71"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22915,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22914,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22916,
|
||||
"src": "197:4:71",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22913,
|
||||
"name": "bool",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "197:4:71",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "196:6:71"
|
||||
},
|
||||
"scope": 22917,
|
||||
"src": "133:70:71",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 22918,
|
||||
"src": "106:99:71"
|
||||
}
|
||||
],
|
||||
"src": "51:155:71"
|
||||
},
|
||||
"legacyAST": {
|
||||
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/interfaces/IWhitelist.sol",
|
||||
"exportedSymbols": {
|
||||
"IWhitelist": [
|
||||
22917
|
||||
]
|
||||
},
|
||||
"id": 22918,
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"nodeType": "SourceUnit",
|
||||
"nodes": [
|
||||
{
|
||||
"id": 22909,
|
||||
"literals": [
|
||||
"solidity",
|
||||
"0.6",
|
||||
".12"
|
||||
],
|
||||
"nodeType": "PragmaDirective",
|
||||
"src": "51:23:71"
|
||||
},
|
||||
{
|
||||
"abstract": false,
|
||||
"baseContracts": [],
|
||||
"contractDependencies": [],
|
||||
"contractKind": "interface",
|
||||
"documentation": null,
|
||||
"fullyImplemented": false,
|
||||
"id": 22917,
|
||||
"linearizedBaseContracts": [
|
||||
22917
|
||||
],
|
||||
"name": "IWhitelist",
|
||||
"nodeType": "ContractDefinition",
|
||||
"nodes": [
|
||||
{
|
||||
"body": null,
|
||||
"documentation": null,
|
||||
"functionSelector": "3af32abf",
|
||||
"id": 22916,
|
||||
"implemented": false,
|
||||
"kind": "function",
|
||||
"modifiers": [],
|
||||
"name": "isWhitelisted",
|
||||
"nodeType": "FunctionDefinition",
|
||||
"overrides": null,
|
||||
"parameters": {
|
||||
"id": 22912,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22911,
|
||||
"mutability": "mutable",
|
||||
"name": "_address",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22916,
|
||||
"src": "156:16:71",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22910,
|
||||
"name": "address",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "156:7:71",
|
||||
"stateMutability": "nonpayable",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_address",
|
||||
"typeString": "address"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "155:18:71"
|
||||
},
|
||||
"returnParameters": {
|
||||
"id": 22915,
|
||||
"nodeType": "ParameterList",
|
||||
"parameters": [
|
||||
{
|
||||
"constant": false,
|
||||
"id": 22914,
|
||||
"mutability": "mutable",
|
||||
"name": "",
|
||||
"nodeType": "VariableDeclaration",
|
||||
"overrides": null,
|
||||
"scope": 22916,
|
||||
"src": "197:4:71",
|
||||
"stateVariable": false,
|
||||
"storageLocation": "default",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
},
|
||||
"typeName": {
|
||||
"id": 22913,
|
||||
"name": "bool",
|
||||
"nodeType": "ElementaryTypeName",
|
||||
"src": "197:4:71",
|
||||
"typeDescriptions": {
|
||||
"typeIdentifier": "t_bool",
|
||||
"typeString": "bool"
|
||||
}
|
||||
},
|
||||
"value": null,
|
||||
"visibility": "internal"
|
||||
}
|
||||
],
|
||||
"src": "196:6:71"
|
||||
},
|
||||
"scope": 22917,
|
||||
"src": "133:70:71",
|
||||
"stateMutability": "view",
|
||||
"virtual": false,
|
||||
"visibility": "external"
|
||||
}
|
||||
],
|
||||
"scope": 22918,
|
||||
"src": "106:99:71"
|
||||
}
|
||||
],
|
||||
"src": "51:155:71"
|
||||
},
|
||||
"compiler": {
|
||||
"name": "solc",
|
||||
"version": "0.6.12+commit.27d51765.Emscripten.clang"
|
||||
},
|
||||
"networks": {},
|
||||
"schemaVersion": "3.2.3",
|
||||
"updatedAt": "2020-10-20T08:24:47.850Z",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
},
|
||||
"userdoc": {
|
||||
"kind": "user",
|
||||
"methods": {},
|
||||
"version": 1
|
||||
}
|
||||
}
|
19724
apps/cic-eth/tests/testdata/bancor/LiquidTokenConverter.json
vendored
19724
apps/cic-eth/tests/testdata/bancor/LiquidTokenConverter.json
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6068
apps/cic-eth/tests/testdata/bancor/NewConverter.json
vendored
6068
apps/cic-eth/tests/testdata/bancor/NewConverter.json
vendored
File diff suppressed because one or more lines are too long
13416
apps/cic-eth/tests/testdata/bancor/NonStandardToken.json
vendored
13416
apps/cic-eth/tests/testdata/bancor/NonStandardToken.json
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6058
apps/cic-eth/tests/testdata/bancor/OldConverter.json
vendored
6058
apps/cic-eth/tests/testdata/bancor/OldConverter.json
vendored
File diff suppressed because one or more lines are too long
2531
apps/cic-eth/tests/testdata/bancor/Owned.json
vendored
2531
apps/cic-eth/tests/testdata/bancor/Owned.json
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user