adding cic-eth as sub dir

This commit is contained in:
2021-02-01 09:12:51 -08:00
parent ed3991e997
commit a4587deac5
317 changed files with 819441 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
# 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_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

View File

@@ -0,0 +1,30 @@
# 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

View File

@@ -0,0 +1,234 @@
# 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)

View File

@@ -0,0 +1,57 @@
# third-party imports
import pytest
import tempfile
import logging
import shutil
logg = logging.getLogger(__name__)
# celery fixtures
@pytest.fixture(scope='session')
def celery_includes():
return [
'cic_eth.eth.bancor',
'cic_eth.eth.token',
'cic_eth.eth.request',
'cic_eth.eth.tx',
'cic_eth.queue.tx',
'cic_eth.admin.ctrl',
'cic_eth.admin.nonce',
'cic_eth.eth.account',
'cic_eth.callbacks.noop',
'cic_eth.callbacks.http',
]
@pytest.fixture(scope='session')
def celery_config():
bq = tempfile.mkdtemp()
bp = tempfile.mkdtemp()
rq = tempfile.mkdtemp()
logg.debug('celery broker queue {} processed {}'.format(bq, bp))
logg.debug('celery backend store {}'.format(rq))
yield {
'broker_url': 'filesystem://',
'broker_transport_options': {
'data_folder_in': bq,
'data_folder_out': bq,
'data_folder_processed': bp,
},
'result_backend': 'file://{}'.format(rq),
}
logg.debug('cleaning up celery filesystem backend files {} {} {}'.format(bq, bp, rq))
shutil.rmtree(bq)
shutil.rmtree(bp)
shutil.rmtree(rq)
@pytest.fixture(scope='session')
def celery_worker_parameters():
return {
# 'queues': ('cic-eth'),
}
@pytest.fixture(scope='session')
def celery_enable_logging():
return True

View File

@@ -0,0 +1,27 @@
# standard imports
import os
import logging
# third-party imports
import pytest
import confini
script_dir = os.path.dirname(os.path.realpath(__file__))
root_dir = os.path.dirname(script_dir)
logg = logging.getLogger(__file__)
@pytest.fixture(scope='session')
def load_config():
config_dir = os.path.join(root_dir, 'config/test')
conf = confini.Config(config_dir, 'CICTEST')
conf.process()
logg.debug('config {}'.format(conf))
return conf
@pytest.fixture(scope='session')
def config(
load_config
):
return load_config

View File

@@ -0,0 +1,58 @@
# standard imports
import os
import logging
# third-party imports
import pytest
import alembic
from alembic.config import Config as AlembicConfig
# local imports
from cic_eth.db import SessionBase
from cic_eth.db import dsn_from_config
logg = logging.getLogger(__file__)
@pytest.fixture(scope='session')
def database_engine(
load_config,
):
if load_config.get('DATABASE_ENGINE') == 'sqlite':
try:
os.unlink(load_config.get('DATABASE_NAME'))
except FileNotFoundError:
pass
SessionBase.transactional = False
SessionBase.poolable = False
dsn = dsn_from_config(load_config)
#SessionBase.connect(dsn, True)
SessionBase.connect(dsn, load_config.get('DATABASE_DEBUG') != None)
return dsn
@pytest.fixture(scope='function')
def init_database(
load_config,
database_engine,
):
rootdir = os.path.dirname(os.path.dirname(__file__))
dbdir = os.path.join(rootdir, 'cic_eth', 'db')
migrationsdir = os.path.join(dbdir, 'migrations', load_config.get('DATABASE_ENGINE'))
if not os.path.isdir(migrationsdir):
migrationsdir = os.path.join(dbdir, 'migrations', 'default')
logg.info('using migrations directory {}'.format(migrationsdir))
session = SessionBase.create_session()
ac = AlembicConfig(os.path.join(migrationsdir, 'alembic.ini'))
ac.set_main_option('sqlalchemy.url', database_engine)
ac.set_main_option('script_location', migrationsdir)
alembic.command.downgrade(ac, 'base')
alembic.command.upgrade(ac, 'head')
yield session
session.commit()
session.close()

View File

@@ -0,0 +1,74 @@
# 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

View File

@@ -0,0 +1,52 @@
# 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

View File

@@ -0,0 +1,10 @@
# third-party imports
import pytest
import os
import json
# local imports
from cic_registry import CICRegistry
from cic_registry.contract import Contract
from cic_registry.error import ChainExistsError

View File

@@ -0,0 +1,27 @@
# 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

View File

@@ -0,0 +1,30 @@
# 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

View File

@@ -0,0 +1,203 @@
# 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
#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_eth_tester,
init_eth_account_roles,
init_w3_conn,
):
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,
):
role = AccountRole.set('GAS_GIFTER', w3_account_roles.get('eth_account_gas_provider'))
init_database.add(role)
init_database.commit()
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_gas_provider',
'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',
]
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

View File

@@ -0,0 +1,215 @@
# 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.enum import StatusEnum
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 = []
s = celery.signature(
'cic_eth.eth.tx.refill_gas',
[
init_w3.eth.accounts[0],
chain_str,
],
queue=None,
)
t = s.apply_async()
tx_raw = t.get()
assert t.successful()
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)
tx_hash_new_hex = t.get()
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'])
assert tx_dict_after['status'] == StatusEnum.OVERRIDDEN
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)

View File

@@ -0,0 +1,162 @@
# 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_balance_api(
default_chain_spec,
default_chain_registry,
init_w3,
cic_registry,
init_database,
bancor_tokens,
bancor_registry,
celery_session_worker,
):
token = CICRegistry.get_address(default_chain_spec, bancor_tokens[0])
api = Api(str(default_chain_spec), callback_param='balance', callback_task='cic_eth.callbacks.noop.noop', queue=None)
t = api.balance(init_w3.eth.accounts[2], token.symbol())
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()
def test_transfer_approval_api(
default_chain_spec,
init_w3,
cic_registry,
init_database,
bancor_registry,
bancor_tokens,
transfer_approval,
celery_session_worker,
):
token = CICRegistry.get_address(default_chain_spec, bancor_tokens[0])
approval_contract = CICRegistry.get_contract(default_chain_spec, 'TransferApproval')
api = Api(str(default_chain_spec), callback_param='transfer_request', callback_task='cic_eth.callbacks.noop.noop', queue=None)
t = api.transfer_request(init_w3.eth.accounts[2], init_w3.eth.accounts[4], approval_contract.address(), 111, token.symbol())
t.get()
#for r in t.collect():
# print(r)
assert t.successful()
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()
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()

View File

@@ -0,0 +1,128 @@
# 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__)
def test_create_account(
default_chain_spec,
init_w3,
init_database,
celery_session_worker,
):
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()
logg.debug('oooo s {}'.format(o))
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()
def test_register_account(
default_chain_spec,
accounts_registry,
init_database,
init_eth_tester,
init_w3,
cic_registry,
celery_session_worker,
eth_empty_accounts,
):
logg.debug('chainspec {}'.format(str(default_chain_spec)))
s = celery.signature(
'cic_eth.eth.account.register',
[
eth_empty_accounts[0],
str(default_chain_spec),
init_w3.eth.accounts[0],
],
)
t = s.apply_async()
address = t.get()
r = t.collect()
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'

View File

@@ -0,0 +1,45 @@
import logging
import os
import celery
from cic_eth.db import TxConvertTransfer
from cic_eth.eth.bancor import BancorTxFactory
logg = logging.getLogger()
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()

View File

@@ -0,0 +1,66 @@
# 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
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 = celery.signature(
'cic_eth.eth.account.gift',
[
init_w3.eth.accounts[7],
str(default_chain_spec),
],
)
s_send = celery.signature(
'cic_eth.eth.tx.send',
[
str(default_chain_spec),
],
)
s.link(s_send)
t = s.apply_async()
signed_tx = t.get()
for r in t.collect():
logg.debug('result {}'.format(r))
assert t.successful()
tx = unpack_signed_raw_tx(bytes.fromhex(signed_tx[0][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

View File

@@ -0,0 +1,246 @@
# 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_database,
cic_registry,
init_eth_account_roles,
celery_session_worker,
eth_empty_accounts,
):
provider_address = AccountRole.get_address('GAS_GIFTER')
receiver_address = eth_empty_accounts[0]
c = init_rpc
refill_amount = c.refill_amount()
balance = init_rpc.w3.eth.getBalance(receiver_address)
s = celery.signature(
'cic_eth.eth.tx.refill_gas',
[
receiver_address,
str(default_chain_spec),
],
)
t = s.apply_async()
r = t.get()
t.collect()
assert t.successful()
s = celery.signature(
'cic_eth.eth.tx.send',
[
[r],
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
session = SessionBase.create_session()
q = session.query(Otx)
q = q.join(TxCache)
q = q.filter(TxCache.recipient==receiver_address)
r = q.first()
assert r.status == StatusEnum.SENT
def test_refill_deduplication(
default_chain_spec,
init_rpc,
init_database,
init_eth_account_roles,
cic_registry,
celery_session_worker,
eth_empty_accounts,
):
provider_address = AccountRole.get_address('ETH_GAS_PROVIDER_ADDRESS')
receiver_address = eth_empty_accounts[0]
c = init_rpc
refill_amount = c.refill_amount()
s = celery.signature(
'cic_eth.eth.tx.refill_gas',
[
receiver_address,
str(default_chain_spec),
],
)
t = s.apply_async()
r = t.get()
for e in t.collect():
pass
assert t.successful()
s = celery.signature(
'cic_eth.eth.tx.refill_gas',
[
receiver_address,
str(default_chain_spec),
],
)
t = s.apply_async()
with pytest.raises(AlreadyFillingGasError):
t.get()
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)
(tx_hash_hex, tx_signed_raw_hex) = sign_and_register_tx(tx_transfer, str(default_chain_spec), 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,
],
)
t = s.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
txf = TokenTxFactory(init_w3.eth.accounts[0], c)
tx_transfer = txf.transfer(bancor_tokens[0], init_w3.eth.accounts[1], 1024, default_chain_spec)
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_resend = celery.signature(
'cic_eth.eth.tx.resend_with_higher_gas',
[
tx_hash_hex,
str(default_chain_spec),
],
)
t = s_resend.apply_async()
i = 0
for r in t.collect():
logg.debug('{} {}'.format(i, r[0].get()))
i += 1
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()

View File

@@ -0,0 +1,355 @@
# 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()

View File

@@ -0,0 +1,49 @@
# third-party imports
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
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()

View File

@@ -0,0 +1,174 @@
# 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
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()
assert t.successful()
init_database.refresh(otx)
assert otx.status == StatusEnum.FUBAR

View File

@@ -0,0 +1,125 @@
# 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
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': 42,
'gas': 21000,
'gasPrice': 1000000,
'value': 128,
'chainId': 666,
'data': '',
}
(tx_hash_hex, tx_raw_signed_hex) = sign_and_register_tx(tx, 'Foo:666', 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:666',
[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:666',
[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': 42,
'gas': 21000,
'gasPrice': 1000000,
'value': 128,
'chainId': 666,
'data': '',
}
(tx_hash_hex, tx_raw_signed_hex) = sign_and_register_tx(tx, 'Foo:666', None)
otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first()
otx.sendfail(session=init_database)
init_database.add(otx)
init_database.commit()
s = celery.signature(
'cic_eth.eth.tx.check_gas',
[
[tx_hash_hex],
'Foo:666',
[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()
otx = init_database.query(Otx).filter(Otx.tx_hash==tx_hash_hex).first()
assert otx.status == StatusEnum.RETRY.value

View File

@@ -0,0 +1,42 @@
# 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,
):
s = celery.signature(
'cic_eth.eth.token.approve',
[
[
{
'address': bancor_tokens[0],
},
],
init_rpc.w3.eth.accounts[0],
init_rpc.w3.eth.accounts[1],
1024,
str(default_chain_spec),
],
)
t = s.apply_async()
t.get()
for r in t.collect():
logg.debug('result {}'.format(r))
assert t.successful()

View File

@@ -0,0 +1,76 @@
# standard imports
import logging
import time
# third-party imports
from erc20_approval_escrow import TransferApproval
import celery
import sha3
# local imports
from cic_eth.eth.token import TokenTxFactory
logg = logging.getLogger()
# BUG: transaction receipt only found sometimes
def test_transfer_approval(
default_chain_spec,
transfer_approval,
bancor_tokens,
w3_account_roles,
eth_empty_accounts,
cic_registry,
init_database,
celery_session_worker,
init_eth_tester,
init_w3,
):
s = celery.signature(
'cic_eth.eth.request.transfer_approval_request',
[
[
{
'address': bancor_tokens[0],
},
],
w3_account_roles['eth_account_sarafu_owner'],
eth_empty_accounts[0],
1024,
str(default_chain_spec),
],
)
s_send = celery.signature(
'cic_eth.eth.tx.send',
[
str(default_chain_spec),
],
)
s.link(s_send)
t = s.apply_async()
tx_signed_raws = t.get()
for r in t.collect():
logg.debug('result {}'.format(r))
assert t.successful()
init_eth_tester.mine_block()
h = sha3.keccak_256()
tx_signed_raw = tx_signed_raws[0]
tx_signed_raw_bytes = bytes.fromhex(tx_signed_raw[2:])
h.update(tx_signed_raw_bytes)
tx_hash = h.digest()
rcpt = init_w3.eth.getTransactionReceipt(tx_hash)
assert rcpt.status == 1
a = TransferApproval(init_w3, transfer_approval)
assert a.last_serial() == 1
logg.debug('requests {}'.format(a.requests(1)['serial']))

View File

@@ -0,0 +1,168 @@
# 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()

View File

@@ -0,0 +1,10 @@
def test_default(
init_database,
):
pass
def test_w3(
init_w3,
):
a = init_w3.eth.accounts[0]

View File

@@ -0,0 +1,27 @@
# 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))

View File

@@ -0,0 +1 @@
[{"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"}]

View File

@@ -0,0 +1 @@
[{"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"}]

View File

@@ -0,0 +1 @@
[{"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"}]

View File

@@ -0,0 +1 @@
[{"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"}]

View File

@@ -0,0 +1 @@
[{"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"}]

View File

@@ -0,0 +1 @@
[{"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"}]

View File

@@ -0,0 +1 @@
[{"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"}]

View File

@@ -0,0 +1 @@
[{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"addressOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

View File

@@ -0,0 +1 @@
[{"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"}]

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

View File

@@ -0,0 +1,704 @@
{
"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
}
}

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

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 it is too large Load Diff

View File

@@ -0,0 +1,837 @@
{
"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
}
}

View File

@@ -0,0 +1,326 @@
{
"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
}
}

View File

@@ -0,0 +1,372 @@
{
"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
}
}

View File

@@ -0,0 +1,309 @@
{
"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
}
}

View File

@@ -0,0 +1,420 @@
{
"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
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,296 @@
{
"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

View File

@@ -0,0 +1,372 @@
{
"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
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,869 @@
{
"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
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,441 @@
{
"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

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,492 @@
{
"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
}
}

View File

@@ -0,0 +1,584 @@
{
"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
}
}

View File

@@ -0,0 +1,243 @@
{
"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
}
}

View File

@@ -0,0 +1,636 @@
{
"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
}
}

View File

@@ -0,0 +1,309 @@
{
"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
}
}

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

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 it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,886 @@
{
"contractName": "ReentrancyGuard",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"ReentrancyGuard The contract provides protection against re-entrancy - calling a function (directly or indirectly) from within itself.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"ensures instantiation only by sub-contracts\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol\":{\"keccak256\":\"0x5ea87c10dd6e7e79212da712eb5f079c03361e6c96e299a4ffd9aaee8d6a3899\",\"license\":\"SEE LICENSE IN LICENSE\",\"urls\":[\"bzz-raw://882aac64a791df35a942480e6ce611d1acb399af4ac0c4ef0288965c3785bf50\",\"dweb:/ipfs/QmeWeYYFh5HZAzJ1SzPHoTcPvZrE4NPUVfmjvH9Q3m36Gg\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"sourceMap": "",
"deployedSourceMap": "",
"source": "// SPDX-License-Identifier: SEE LICENSE IN LICENSE\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @dev ReentrancyGuard\r\n *\r\n * The contract provides protection against re-entrancy - calling a function (directly or\r\n * indirectly) from within itself.\r\n*/\r\ncontract ReentrancyGuard {\r\n // true while protected code is being executed, false otherwise\r\n bool private locked = false;\r\n\r\n /**\r\n * @dev ensures instantiation only by sub-contracts\r\n */\r\n constructor() internal {}\r\n\r\n // protects a function against reentrancy attacks\r\n modifier protected() {\r\n _protected();\r\n locked = true;\r\n _;\r\n locked = false;\r\n }\r\n\r\n // error message binary size optimization\r\n function _protected() internal view {\r\n require(!locked, \"ERR_REENTRANCY\");\r\n }\r\n}\r\n",
"sourcePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol",
"ast": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol",
"exportedSymbols": {
"ReentrancyGuard": [
22242
]
},
"id": 22243,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 22207,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:59"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 22208,
"nodeType": "StructuredDocumentation",
"src": "79:167:59",
"text": " @dev ReentrancyGuard\n The contract provides protection against re-entrancy - calling a function (directly or\n indirectly) from within itself."
},
"fullyImplemented": true,
"id": 22242,
"linearizedBaseContracts": [
22242
],
"name": "ReentrancyGuard",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 22211,
"mutability": "mutable",
"name": "locked",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22242,
"src": "349:27:59",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 22209,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "349:4:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 22210,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "371:5:59",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"visibility": "private"
},
{
"body": {
"id": 22215,
"nodeType": "Block",
"src": "483:2:59",
"statements": []
},
"documentation": {
"id": 22212,
"nodeType": "StructuredDocumentation",
"src": "385:69:59",
"text": " @dev ensures instantiation only by sub-contracts"
},
"id": 22216,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22213,
"nodeType": "ParameterList",
"parameters": [],
"src": "471:2:59"
},
"returnParameters": {
"id": 22214,
"nodeType": "ParameterList",
"parameters": [],
"src": "483:0:59"
},
"scope": 22242,
"src": "460:25:59",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 22230,
"nodeType": "Block",
"src": "569:92:59",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 22218,
"name": "_protected",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22241,
"src": "580:10:59",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$__$",
"typeString": "function () view"
}
},
"id": 22219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "580:12:59",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22220,
"nodeType": "ExpressionStatement",
"src": "580:12:59"
},
{
"expression": {
"argumentTypes": null,
"id": 22223,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 22221,
"name": "locked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22211,
"src": "603:6:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 22222,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "612:4:59",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "603:13:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22224,
"nodeType": "ExpressionStatement",
"src": "603:13:59"
},
{
"id": 22225,
"nodeType": "PlaceholderStatement",
"src": "627:1:59"
},
{
"expression": {
"argumentTypes": null,
"id": 22228,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 22226,
"name": "locked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22211,
"src": "639:6:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 22227,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "648:5:59",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "639:14:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22229,
"nodeType": "ExpressionStatement",
"src": "639:14:59"
}
]
},
"documentation": null,
"id": 22231,
"name": "protected",
"nodeType": "ModifierDefinition",
"overrides": null,
"parameters": {
"id": 22217,
"nodeType": "ParameterList",
"parameters": [],
"src": "566:2:59"
},
"src": "548:113:59",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 22240,
"nodeType": "Block",
"src": "752:53:59",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 22236,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "771:7:59",
"subExpression": {
"argumentTypes": null,
"id": 22235,
"name": "locked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22211,
"src": "772:6:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f5245454e5452414e4359",
"id": 22237,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "780:16:59",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e0eaf77891cd79d274f1446031427d8091629657fef0bd3d01a673469e9b08c",
"typeString": "literal_string \"ERR_REENTRANCY\""
},
"value": "ERR_REENTRANCY"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_6e0eaf77891cd79d274f1446031427d8091629657fef0bd3d01a673469e9b08c",
"typeString": "literal_string \"ERR_REENTRANCY\""
}
],
"id": 22234,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "763:7:59",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 22238,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "763:34:59",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22239,
"nodeType": "ExpressionStatement",
"src": "763:34:59"
}
]
},
"documentation": null,
"id": 22241,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_protected",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22232,
"nodeType": "ParameterList",
"parameters": [],
"src": "735:2:59"
},
"returnParameters": {
"id": 22233,
"nodeType": "ParameterList",
"parameters": [],
"src": "752:0:59"
},
"scope": 22242,
"src": "716:89:59",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
}
],
"scope": 22243,
"src": "248:560:59"
}
],
"src": "52:758:59"
},
"legacyAST": {
"absolutePath": "/home/lash/src/ext/cic/grassrootseconomics/bancor-contracts/solidity/contracts/utility/ReentrancyGuard.sol",
"exportedSymbols": {
"ReentrancyGuard": [
22242
]
},
"id": 22243,
"license": "SEE LICENSE IN LICENSE",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 22207,
"literals": [
"solidity",
"0.6",
".12"
],
"nodeType": "PragmaDirective",
"src": "52:23:59"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": {
"id": 22208,
"nodeType": "StructuredDocumentation",
"src": "79:167:59",
"text": " @dev ReentrancyGuard\n The contract provides protection against re-entrancy - calling a function (directly or\n indirectly) from within itself."
},
"fullyImplemented": true,
"id": 22242,
"linearizedBaseContracts": [
22242
],
"name": "ReentrancyGuard",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 22211,
"mutability": "mutable",
"name": "locked",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 22242,
"src": "349:27:59",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 22209,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "349:4:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 22210,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "371:5:59",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"visibility": "private"
},
{
"body": {
"id": 22215,
"nodeType": "Block",
"src": "483:2:59",
"statements": []
},
"documentation": {
"id": 22212,
"nodeType": "StructuredDocumentation",
"src": "385:69:59",
"text": " @dev ensures instantiation only by sub-contracts"
},
"id": 22216,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22213,
"nodeType": "ParameterList",
"parameters": [],
"src": "471:2:59"
},
"returnParameters": {
"id": 22214,
"nodeType": "ParameterList",
"parameters": [],
"src": "483:0:59"
},
"scope": 22242,
"src": "460:25:59",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 22230,
"nodeType": "Block",
"src": "569:92:59",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 22218,
"name": "_protected",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22241,
"src": "580:10:59",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$__$",
"typeString": "function () view"
}
},
"id": 22219,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "580:12:59",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22220,
"nodeType": "ExpressionStatement",
"src": "580:12:59"
},
{
"expression": {
"argumentTypes": null,
"id": 22223,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 22221,
"name": "locked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22211,
"src": "603:6:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 22222,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "612:4:59",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "603:13:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22224,
"nodeType": "ExpressionStatement",
"src": "603:13:59"
},
{
"id": 22225,
"nodeType": "PlaceholderStatement",
"src": "627:1:59"
},
{
"expression": {
"argumentTypes": null,
"id": 22228,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 22226,
"name": "locked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22211,
"src": "639:6:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 22227,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "648:5:59",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "639:14:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22229,
"nodeType": "ExpressionStatement",
"src": "639:14:59"
}
]
},
"documentation": null,
"id": 22231,
"name": "protected",
"nodeType": "ModifierDefinition",
"overrides": null,
"parameters": {
"id": 22217,
"nodeType": "ParameterList",
"parameters": [],
"src": "566:2:59"
},
"src": "548:113:59",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 22240,
"nodeType": "Block",
"src": "752:53:59",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 22236,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "771:7:59",
"subExpression": {
"argumentTypes": null,
"id": 22235,
"name": "locked",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22211,
"src": "772:6:59",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f5245454e5452414e4359",
"id": 22237,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "780:16:59",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e0eaf77891cd79d274f1446031427d8091629657fef0bd3d01a673469e9b08c",
"typeString": "literal_string \"ERR_REENTRANCY\""
},
"value": "ERR_REENTRANCY"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_6e0eaf77891cd79d274f1446031427d8091629657fef0bd3d01a673469e9b08c",
"typeString": "literal_string \"ERR_REENTRANCY\""
}
],
"id": 22234,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "763:7:59",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 22238,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "763:34:59",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 22239,
"nodeType": "ExpressionStatement",
"src": "763:34:59"
}
]
},
"documentation": null,
"id": 22241,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_protected",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22232,
"nodeType": "ParameterList",
"parameters": [],
"src": "735:2:59"
},
"returnParameters": {
"id": 22233,
"nodeType": "ParameterList",
"parameters": [],
"src": "752:0:59"
},
"scope": 22242,
"src": "716:89:59",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
}
],
"scope": 22243,
"src": "248:560:59"
}
],
"src": "52:758:59"
},
"compiler": {
"name": "solc",
"version": "0.6.12+commit.27d51765.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.2.3",
"updatedAt": "2020-10-20T08:24:47.844Z",
"devdoc": {
"details": "ReentrancyGuard The contract provides protection against re-entrancy - calling a function (directly or indirectly) from within itself.",
"kind": "dev",
"methods": {
"constructor": {
"details": "ensures instantiation only by sub-contracts"
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

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