diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile new file mode 100644 index 0000000..8c54ec3 --- /dev/null +++ b/.circleci/Dockerfile @@ -0,0 +1,103 @@ +ARG eos_branch=v1.3.1 +ARG eos_symbol=SYS + +FROM tokenika/eosio:v1.5.0 + +############## PYTHON ############################################################################################# +## Based mostly on https://github.com/docker-library/python/blob/005dda958/3.5/jessie/Dockerfile +ARG python_version=3.5.6 + +ENV PATH /usr/local/bin:$PATH + +# http://bugs.python.org/issue19846 +# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. +ENV LANG C.UTF-8 +ENV TERM xterm + +RUN set -ex \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${python_version%%[a-z]*}/Python-$python_version.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${python_version%%[a-z]*}/Python-$python_version.tar.xz.asc" \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --enable-loadable-sqlite-extensions \ + --enable-shared \ + --with-system-expat \ + --with-system-ffi \ + --without-ensurepip \ + && make -j "$(nproc)" \ + && make install \ + && ldconfig \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' + \ + && rm -rf /usr/src/python \ + \ + && python3 --version + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && ln -s idle3 idle \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python3-config python-config + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 18.0 + +RUN set -ex; \ + \ + wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ + \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + "pip==$PYTHON_PIP_VERSION" \ + ; \ + pip --version; \ + \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests \) \) \ + -o \ + \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \) -exec rm -rf '{}' +; \ + rm -f get-pip.py + +RUN python -m pip install termcolor +############## EOS CDT ############################################################################################# + +RUN wget https://github.com/eosio/eosio.cdt/releases/download/v1.4.1/eosio.cdt-1.4.1.x86_64.deb && \ + apt install ./eosio.cdt-1.4.1.x86_64.deb \ + && rm ./eosio.cdt-1.4.1.x86_64.deb + +############## EOS FACTORY ############################################################################################# + +ARG eosfactory_branch=master +RUN git clone -b "$eosfactory_branch" https://github.com/tokenika/eosfactory.git /opt/eosfactory/ +WORKDIR /opt/eosfactory/ +RUN git branch +RUN git log -10 --oneline +RUN mkdir /opt/workspace +RUN apt-get update && apt-get install -y expect +RUN mkdir ~/eosio-wallet/ +RUN /opt/eosfactory/tests/integration/expect_script.sh + +# https://superuser.com/a/1253889/59009 +RUN sed -i 's/mesg n || true/tty -s \&\& mesg n || true/g' /root/.profile +RUN chmod +x ./tests/unittest.sh + +WORKDIR /opt/eosfactory/tests/ + +# bash loads .profile by default +ENTRYPOINT ["/bin/bash", "-l", "-c"] diff --git a/.circleci/config.yml b/.circleci/config.yml index e9deead..eb596de 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,52 +5,42 @@ version: 2 jobs: build: + working_directory: ~/ore-protocol docker: # specify the version you desire here # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` - - image: circleci/python:3.6.1 - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/postgres:9.4 - - working_directory: ~/repo + - image: bcelebci/ore-protocol + environment: + PIPENV_VENV_IN_PROJECT: true steps: - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "requirements.txt" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: - name: install dependencies - command: | - python3 -m venv venv - . venv/bin/activate - pip install -r requirements.txt - - - save_cache: - paths: - - ./venv - key: v1-dependencies-{{ checksum "requirements.txt" }} - + # - restore_cache: # restores saved dependency cache if the Branch key template or requirements.txt files have not changed since the previous run + # key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }} + # - run: + # name: install dependencies + # command: | + # ./expect_script.sh + # sudo -H python3 -m pip install -e eosfactory/ + # python3 eosfactory/eosfactory/install.py /opt/eos ~/testeos/contracts # run tests! # this example uses Django's built-in test-runner # other common Python testing frameworks include pytest and nose # https://pytest.org # https://nose.readthedocs.io + # - save_cache: # special step to save dependency cache + # key: deps1-{{ .Branch }}-{{ checksum "requirements.txt" }} + # paths: + # - "venv" - run: name: run tests command: | - . venv/bin/activate - python manage.py test + tests/build_and_test.sh + python3 tests/standard_token.py + python3 tests/rights_registry.py + python3 tests/instrument.py + python3 tests/usage_log.py - store_artifacts: path: test-reports - destination: test-reports - + destination: test-reports \ No newline at end of file diff --git a/contracts/ore.instrument/ore.instrument.cpp b/contracts/ore.instrument/ore.instrument.cpp index 3c6b72a..61f5fdc 100644 --- a/contracts/ore.instrument/ore.instrument.cpp +++ b/contracts/ore.instrument/ore.instrument.cpp @@ -1,25 +1,35 @@ #include "ore.instrument.hpp" using namespace eosio; -// transaction id for deferred transaction -account_name RIGHTS_CONTRACT_NAME = N(rights.ore); - -// Creates new instrument -// NOTE: this should result in changes in the following tables : -// tokens - add new token -// account - instrument owner's list of owned instruments get updated -// accounts - OREINST symbol balance gets updated - -// mint action internally calls a deferred transaction with 2 types of actions: -// checkright - for each right in the instrument object, mint instrument calls check right within a deferred transaction -// createinst - once all the rights are checked, the last action in the deferred transaction is createinst which adds the instrument to the tokens table -// NOTE: if any of the checkright action fails, it will cancel the deferred transaction and the creatinst action will not be called. Hence no instrument will be created. -void instrument::mint(account_name minter, account_name owner, instrument_data instrument, +/* + Creates new instrument + NOTE: this should result in changes in the following tables : + tokens - add new token + account - instrument owner's list of owned instruments get updated + accounts - OREINST symbol balance gets updated + + mint action internally calls a deferred transaction with 2 types of actions: + checkright - for each right in the instrument object, mint instrument calls check right within a deferred transaction + createinst - once all the rights are checked, the last action in the deferred transaction is createinst which adds the instrument to the tokens table + NOTE: if any of the checkright action fails, it will cancel the deferred transaction and the creatinst action will not be called. Hence no instrument will be created. + + owner - owner of the new instrument + minter - account authorized to mint the instrument's rights + either the minter or the owner should own the right (or be whitelisted by the owner of the right) + */ +ACTION instrument::mint(name minter, name owner, instrument_data instrument, uint64_t start_time, uint64_t end_time, uint64_t instrumentId = 0) { // Checking if the minter has the required authorization require_auth(minter); - auto hashtable = _tokens.get_index(); + + string msg = "owner account does not exist " + owner.to_string(); + eosio_assert(is_account(owner), msg.c_str()); + + // if an instrument_template name is passed-in, look from an instrument with the same name on the chain + // ...if one exists, the new instrument will be a copy of that one + // All instruments with the same template name will have the same data - only the dates may be different + auto hashtable = _tokens.get_index<"templatehash"_n>(); auto item = hashtable.find(hashStringToInt(instrument.instrument_template)); if (instrument.rights.size() == 0) @@ -28,12 +38,12 @@ void instrument::mint(account_name minter, account_name owner, instrument_data i } // If instrumentId value passed as 0, next available primate key will be automatically assigned as instrumentId - // This mean, you can not set instrumentId specifically to 0, because it means pick the next available key. + // So, instrumentId can't be set to 0 if (instrumentId == 0) { - if (_tokens.available_primary_key() == 0) + if (_tokens.available_primary_key() == 0) //first instrument created { - instrumentId = 1; // assigning the available key + instrumentId = 1; } else { @@ -47,7 +57,10 @@ void instrument::mint(account_name minter, account_name owner, instrument_data i eosio_assert(institr == _tokens.end(), "instrumentId exists!"); } - // If an instrument already exists with the given template name, get the instrument data from the existing instrument + // ------- Copy an existing intstrument from a template + // If an instrument already exists with the given template name + // ... copy the instrument data from the existing instrument + // ... the owner of the new instrument is the same as existing instrument (you can't make a copy of someone else's template) if (instrument.instrument_template != "" && item != hashtable.end()) { instrument.issuer = item->instrument.issuer; @@ -65,45 +78,50 @@ void instrument::mint(account_name minter, account_name owner, instrument_data i transaction create_instrument{}; // create an unique id for the deferred transaction - uint64_t create_transaction_id = now(); + uint64_t transaction_id = instrumentId; // Adding createinst action to the deferred transaction to add the new instrument to the tokens table create_instrument.actions.emplace_back( - permission_level{N(instr.ore), N(active)}, _self, N(createinst), + permission_level{"instr.ore"_n, "active"_n}, "instr.ore"_n, "createinst"_n, std::make_tuple(minter, owner, instrumentId, instrument, start_time, end_time, - create_transaction_id)); + transaction_id)); // send deferred transaction - create_instrument.send(create_transaction_id, minter); + create_instrument.send(transaction_id, minter); } else { + // ------- Create a new intstrument // create a deferred transaction object to check rights and add instrument to the tokens table transaction deferred_instrument{}; // create an unique id for the deferred transaction - uint64_t deferred_trx_id = now(); + // this deferred_transaction_id is different than the actual completed transaction Id + uint64_t deferred_transaction_id = instrumentId; + + // The creation of this instrument is a series of steps grouped into one deferred transaction - // checking if the issuer is the owner of the rights + // Step 1 - add one action for each right to check if the issuer is approved to issue an instrument with that right for (int i = 0; i < instrument.rights.size(); i++) { deferred_instrument.actions.emplace_back( - permission_level{N(instr.ore), N(active)}, _self, N(checkright), + permission_level{"instr.ore"_n, "active"_n}, _self, "checkright"_n, std::make_tuple( minter, instrument.issuer, instrument.rights[i].right_name, - deferred_trx_id)); + deferred_transaction_id)); } - // Adding createinst action to the deferred transaction to add the new instrument to the tokens table + // Step 2 - if all the prior actions are sucessful (did not cancel because a right was invalid) + // ... create the instrument as the last step in the transaction chain (using the createinst action) deferred_instrument.actions.emplace_back( - permission_level{N(instr.ore), N(active)}, _self, N(createinst), + permission_level{"instr.ore"_n, "active"_n}, _self, "createinst"_n, std::make_tuple(minter, owner, instrumentId, @@ -111,17 +129,23 @@ void instrument::mint(account_name minter, account_name owner, instrument_data i start_time, end_time)); - // send deferred transaction - deferred_instrument.send(deferred_trx_id, minter); + // Step 3 - send deferred transaction + deferred_instrument.send(deferred_transaction_id, minter); } } -void instrument::createinst(account_name minter, account_name owner, uint64_t instrumentId, instrument_data instrument, uint64_t start_time, uint64_t end_time) +/* + createinst creates a row in the instruments table or modifies an already existing row in the instrument table for the given instrument id + This is called by the mint/update action - as the last step in the list of deferred transactions + This can only be called within the instrument contract (requires _self for instr.ore) +*/ +ACTION instrument::createinst(name minter, name owner, uint64_t instrumentId, instrument_data instrument, uint64_t start_time, uint64_t end_time) { require_auth(_self); - auto accountitr = _account.find(owner); + auto accountitr = _account.find(owner.value); - // check if account is already registered to accounts table + // We track every instrumentId a user owns in the accounts table - along with total count (balance) for each user + // The first time a user creates an instrument, create a record in the accounts table in this contract if (accountitr == _account.end()) { _account.emplace(_self, [&](auto &a) { @@ -129,97 +153,136 @@ void instrument::createinst(account_name minter, account_name owner, uint64_t in a.balance = 0; print("new instrument account: ", a.primary_key(), "\n"); }); - accountitr = _account.find(owner); + accountitr = _account.find(owner.value); } - // writing to tokens table - _tokens.emplace(_self, [&](auto &a) { - a.id = instrumentId; - a.owner = owner; - a.minted_by = minter; - a.minted_at = time(0); - a.instrument = instrument; - a.revoked = false; - a.start_time = start_time; - a.end_time = end_time; - a.template_hash = hashStringToInt(instrument.instrument_template); - a.class_hash = hashStringToInt(instrument.instrument_class); - }); + auto tokenitr = _tokens.find(instrumentId); - // increasing the account balance (total token count) - _account.modify(accountitr, 0, [&](auto &a) { - a.balance++; - a.instruments.push_back(instrumentId); - }); + // if there is no existing instrument with the input instrument id + if(tokenitr == _tokens.end()){ + // all instruments are stored in the tokens table + _tokens.emplace(_self, [&](auto &a) { + a.id = instrumentId; + a.owner = owner; + a.minted_by = minter; + a.minted_at = now();; + a.instrument = instrument; + a.revoked = false; + a.start_time = start_time; + a.end_time = end_time; + a.template_hash = hashStringToInt(instrument.instrument_template); + a.class_hash = hashStringToInt(instrument.instrument_class); + }); - print("minter", name{minter}); + // increasing the account balance (total token count) + _account.modify(accountitr, same_payer, [&](auto &a) { + a.balance++; + a.instruments.push_back(instrumentId); + }); - print("action:mint instrument:", instrumentId, " to:", name{owner}, "\n"); + print("action:mint Created new instrument: type: " + instrument.instrument_class + " id: " + to_string(instrumentId) + " for: " + owner.to_string() + "\n"); - eosio_assert(is_account(owner), "to account does not exist"); + // transfer 1 OREINST from the issuer account for OREINST to the owner account of instrument + sub_balance(_self, asset(10000, symbol(symbol_code("OREINST"),4))); + add_balance(owner, asset(10000, symbol(symbol_code("OREINST"),4)), _self); + } else { + // update an already existing instrument + _tokens.modify(tokenitr, same_payer, [&](auto &a) { + a.id = instrumentId; + a.owner = owner; + a.minted_by = a.minted_by; + a.minted_at = now(); + a.instrument = instrument; + a.revoked = false; + a.start_time = start_time; + a.end_time = end_time; + a.template_hash = hashStringToInt(instrument.instrument_template); + a.class_hash = hashStringToInt(instrument.instrument_class); + }); - // transfer 1 OREINST from the issuer account for OREINST to the owner account of instrument - sub_balance(_self, asset(10000, symbol_type(S(4, OREINST)))); - add_balance(owner, asset(10000, symbol_type(S(4, OREINST))), _self); + print("action:update Updated instrument: type: " + instrument.instrument_class + " id: " + to_string(instrumentId) + " for: " + owner.to_string() + "\n"); + } } -void instrument::checkright(account_name minter, account_name issuer, string rightname, uint64_t deferred_transaction_id = 0) +/* + Checks that the issuer and owner are authorized to issue an instrument that includes this right (either the owner or in whitelist) + This is called by the mint action - as part of a deferred transaction during the minting process + This is called once for each right to be added to the instrument + This can only be called within the instrument contract (requires _self for instr.ore) +*/ +ACTION instrument::checkright(name minter, name issuer, string rightname, uint64_t deferred_transaction_id = 0) { - require_auth(_self); - //instantiating rights.ore contract - rights_registry rights_contract = rights_registry(RIGHTS_CONTRACT_NAME); + string msg; - print("action:checkright:", rightname, "\n"); + rights_registry rights_contract("rights.ore"_n,"rights.ore"_n,_ds); + // check that right exists in the rights registry auto rightitr = rights_contract.find_right_by_name(rightname); - if (rightitr.owner == 0) + + if (rightitr.owner.value == 0) { if (deferred_transaction_id != 0) { - cancel_deferred(deferred_transaction_id); + cancel_deferred(deferred_transaction_id); } - eosio_assert(false, "right doesn't exist"); + msg = "right:" + rightname + " doesn't exist"; + eosio_assert(rightitr.owner.value != 0, msg.c_str()); } // check if the minter of the instrument is the issuer of the right bool minter_owns_right = rightitr.owner == minter; if (!minter_owns_right) { - auto position_in_whitelist = std::find(rightitr.issuer_whitelist.begin(), rightitr.issuer_whitelist.end(), minter); - eosio_assert(position_in_whitelist != rightitr.issuer_whitelist.end(), "minter neither owns the right nor whitelisted for the right"); + auto position_in_whitelist = std::find(rightitr.issuer_whitelist.begin(), rightitr.issuer_whitelist.end(), minter); + //if minter is not in whitelist, cancel the entire mint transaction + if (position_in_whitelist == rightitr.issuer_whitelist.end()) + { + if (deferred_transaction_id != 0) + { + cancel_deferred(deferred_transaction_id); + } + msg = "Attempt to create instrument with right: " + rightname + " by minter: " + minter.to_string() + " who isn't whitelisted or owner of right"; + eosio_assert(false, msg.c_str()); + } } + // check if the issuer of the instrument is the owner of the right bool issuer_owns_right = rightitr.owner == issuer; - if (!issuer_owns_right) { auto issuer_in_whitelist = std::find(rightitr.issuer_whitelist.begin(), rightitr.issuer_whitelist.end(), issuer); + //if issuer is not in whitelist, cancel the entire mint transaction if (issuer_in_whitelist == rightitr.issuer_whitelist.end()) { if (deferred_transaction_id != 0) { cancel_deferred(deferred_transaction_id); } - eosio_assert(true, "instrument issuer neither holds the right nor whitelisted for the right"); + msg = "Attempt to create instrument with right: " + rightname + " by issuer: " + issuer.to_string() + " who isn't whitelisted or owner of right"; + eosio_assert(false, msg.c_str()); } } } -// updates an instrument -// NOTE: this should result in changes in the following table : -// tokens - the instrument token gets updated depending on the mutabiility -// if mutability is 1, start_time and/or end_time can be updated -// if mutability is 2, everything except the owner can be updated -void instrument::update(account_name updater, string instrument_template, instrument_data instrument = {}, +/* + updates an instrument (in the tokens table) + the instrument token gets updated depending on the mutabiility + mutability = 0 - completely immutable + mutability = 1 - start_time and/or end_time can be updated + mutability = 2 - everything mutable except the owner can't be updated (calls createinst action as a deferred transaction in this case to update instrument ) +*/ +ACTION instrument::update(name updater, string instrument_template, instrument_data instrument = {}, uint64_t instrument_id = 0, uint64_t start_time = 0, uint64_t end_time = 0) -{ +{ require_auth(updater); uint64_t new_start; uint64_t new_end; instrument::token item; + + //find existing instrument by id or template if (instrument_id != 0) { item = find_token_by_id(instrument_id); @@ -235,7 +298,7 @@ void instrument::update(account_name updater, string instrument_template, instru eosio_assert(item.instrument.mutability == 1 || item.instrument.mutability == 2, "the instrument to be updated is immutable"); - rights_registry rights_contract = rights_registry(RIGHTS_CONTRACT_NAME); + rights_registry rights_contract("rights.ore"_n,"rights.ore"_n,_ds); auto tokenitr = _tokens.find(item.id); @@ -259,15 +322,20 @@ void instrument::update(account_name updater, string instrument_template, instru new_end = item.end_time; } + // mutability = 1 - update dates if (item.instrument.mutability == 1) { - // update the instrument token in the tokens table - _tokens.modify(tokenitr, 0, [&](auto &a) { + // update the instrument token in the tokens table + _tokens.modify(tokenitr, same_payer, [&](auto &a) { a.start_time = new_start; a.end_time = new_end; }); + + print("action:update Updated instrument: type: " + item.instrument.instrument_class + " id: " + to_string(item.id) + " for: " + item.owner.to_string() + "\n"); } - else + + // mutability = 2 - update anything + if (item.instrument.mutability == 2) { item.instrument.issuer = instrument.issuer; item.instrument.instrument_class = instrument.instrument_class; @@ -280,159 +348,142 @@ void instrument::update(account_name updater, string instrument_template, instru item.instrument.encrypted_by = instrument.encrypted_by; item.instrument.mutability = instrument.mutability; - // Checking if the issuer is the owner of the rights - for (int i = 0; i < instrument.rights.size(); i++) - { - auto rightitr = rights_contract.find_right_by_name(instrument.rights[i].right_name); - if (rightitr.owner == 0) - eosio_assert(false, "right doesn't exist"); - - if (rightitr.owner != instrument.issuer) - { - auto updaterOwnsRight = rightitr.owner == updater; + transaction deferred_instrument{}; - auto positionInWhitelist = std::find(rightitr.issuer_whitelist.begin(), rightitr.issuer_whitelist.end(), updater); - auto updaterWhitelistedForRight = positionInWhitelist != rightitr.issuer_whitelist.end(); + uint64_t deferred_trx_id = item.id; - //check if updater has to authorization over the rights - if (positionInWhitelist == rightitr.issuer_whitelist.end()) - { - eosio_assert((updaterOwnsRight), "updater doesn't own the right and is not on issuer's whitelist"); - } - } + for (int i = 0; i < item.instrument.rights.size(); i++) + { + deferred_instrument.actions.emplace_back( + permission_level{"instr.ore"_n, "active"_n}, _self, "checkright"_n, + std::make_tuple( + updater, + instrument.issuer, + instrument.rights[i].right_name, + deferred_trx_id)); } - auto tokenitr = _tokens.find(item.id); - // update the instrument token in the tokens table - _tokens.modify(tokenitr, 0, [&](auto &a) { - a.id = item.id; - a.owner = item.owner; - a.minted_by = updater; - a.minted_at = time(0); - a.instrument = item.instrument; - a.revoked = false; - a.start_time = new_start; - a.end_time = new_end; - a.template_hash = hashStringToInt(instrument.instrument_template); - a.class_hash = hashStringToInt(instrument.instrument_class); - }); - } - - print("updater", name{updater}); + // Adding createinst action to the deferred transaction to add the new instrument to the tokens table + deferred_instrument.actions.emplace_back( + permission_level{"instr.ore"_n, "active"_n}, _self, "createinst"_n, + std::make_tuple(updater, + item.owner, + instrument_id, + instrument, + start_time, + end_time)); - print("action:update instrument:", instrument_id, "\n"); + // send deferred transaction + deferred_instrument.send(deferred_trx_id, _self); + } } -// transfers an instrument -// NOTE: this should result in changes in the following tables : -// tokens - owner field of the token gets updated -// account - instrument owner's list of owned instruments get updated -// accounts - OREINST symbol balance gets updated -void instrument::transfer(account_name sender, account_name to, uint64_t token_id) +/* + transfers an instrument (owner field for the instrument gets updated to the new owner in the tokens table) + */ +ACTION instrument::transfer(name sender, name to, uint64_t instrument_id) { + require_auth(sender); + string msg; + //find token - auto tokenitr = _tokens.find(token_id); - - eosio_assert(tokenitr->owner == sender, "Sender account is not allowed to transfer the instrument"); - - eosio_assert(tokenitr->revoked == false, "token is revoked"); - - eosio_assert(tokenitr != _tokens.end(), "Token doesn't exists"); - - // NOTE: Use in future if required - // Allows an "allowed" account from the allowance table to be able to do transfer on the instrument owner's behalf - // bool is_approved_sender = false; - // if (tokenitr->owner != sender) - // { - // allowances _allowances(_self, tokenitr->owner); - // auto allowanceitr = _allowances.find(token_id); - // eosio_assert(allowanceitr->to == sender, "Sender is not allowed"); - // _allowances.erase(allowanceitr); - // is_approved_sender = true; - // } - // increment/decrement balances - // if (is_approved_sender) - // { - // transfer_balances(sender, tokenitr->owner, to, token_id); - // sub_balance_from(sender, tokenitr->owner, asset(10000, symbol_type(S(4, OREINST)))); - // add_balance(to, asset(10000, symbol_type(S(4, OREINST))), sender); - // } - // else - // { - // transfer_balances(sender, sender, to, token_id); - // sub_balance(sender, asset(10000, symbol_type(S(4, OREINST)))); - // add_balance(to, asset(10000, symbol_type(S(4, OREINST))), sender); - // } - - transfer_balances(sender, to, token_id); - sub_balance(sender, asset(10000, symbol_type(S(4, OREINST)))); - add_balance(to, asset(10000, symbol_type(S(4, OREINST))), sender); - _tokens.modify(tokenitr, 0, [&](auto &a) { + auto tokenitr = _tokens.find(instrument_id); + + msg = "Instrument Id" + to_string(instrument_id) + "doesn't exist"; + eosio_assert(tokenitr != _tokens.end(), msg.c_str()); + + msg = "Sender account is not allowed to transfer the instrument " + sender.to_string(); + eosio_assert(tokenitr->owner == sender, msg.c_str()); + + msg = "Instrument Id " + to_string(instrument_id) + " has been previously revoked"; + eosio_assert(tokenitr->revoked == false, msg.c_str()); + + // transfer balance in the accounts table + transfer_balances(sender, to, instrument_id); + + // transfer OREINST balance + sub_balance(sender, asset(10000, symbol(symbol_code("OREINST"),4))); + add_balance(to, asset(10000, symbol(symbol_code("OREINST"),4)), sender); + _tokens.modify(tokenitr, same_payer, [&](auto &a) { a.owner = to; }); } -void instrument::revoke(account_name revoker, uint64_t token_id) +// revokes an instrument - A revoked instrument is no longer active and cannot be used +ACTION instrument::revoke(name revoker, uint64_t instrument_id) { require_auth(revoker); + string msg; + //Checking if the token exists. - auto tokenitr = _tokens.find(token_id); - eosio_assert(tokenitr != _tokens.end(), "Token doesn't exists"); + auto tokenitr = _tokens.find(instrument_id); + + msg = "Instrument Id" + to_string(instrument_id) + "doesn't exist"; + eosio_assert(tokenitr != _tokens.end(), msg.c_str()); - eosio_assert(tokenitr->owner == revoker, "The revoker account doesn't have authority to revoke the instrument"); + msg = "The account " + revoker.to_string() + "doesn't have authority to revoke the instrument"; + eosio_assert(tokenitr->owner == revoker, msg.c_str()); - eosio_assert(tokenitr->revoked == false, "Token is already revoked"); + msg = "Instrument Id" + to_string(instrument_id) + "has been previously revoked"; + eosio_assert(tokenitr->revoked == false, msg.c_str()); - _tokens.modify(tokenitr, 0, [&](auto &t) { + _tokens.modify(tokenitr, same_payer, [&](auto &t) { t.revoked = true; }); } -// delets an instrument only if it's mutability is 2 -// NOTE: this should result in changes in the following tables : -// tokens - burnt token gets removed from the table -// account - instrument owner's list of owned instruments get updated -// accounts - OREINST symbol balance gets updated -void instrument::burn(account_name burner, uint64_t token_id) +/* + deletes an instrument (from the tokens table) + deletes only if it's mutability is 2 ( as mutability 2 means we can change anything) +*/ +ACTION instrument::burn(name burner, uint64_t instrument_id) { require_auth(burner); + + string msg; bool from = false; // Checking if the token exists. - auto tokenitr = _tokens.find(token_id); - eosio_assert(tokenitr != _tokens.end(), "Token doesn't exists"); + auto tokenitr = _tokens.find(instrument_id); + + msg = "Instrument Id" + to_string(instrument_id) + "doesn't exist"; + eosio_assert(tokenitr != _tokens.end(), msg.c_str()); - eosio_assert(tokenitr->owner == burner, "The burner account doesn't have authority to delete the instrument"); + msg = "The account " + burner.to_string() + "doesn't have authority to burn the instrument"; + eosio_assert(tokenitr->owner == burner, msg.c_str()); - eosio_assert(tokenitr->instrument.mutability == 2, "Instrument is not mutable"); + msg = "Instrument Id" + to_string(instrument_id) + "is not mutable and cannot be burned."; + eosio_assert(tokenitr->instrument.mutability == 2, msg.c_str()); - transfer_balances(burner, 0, token_id); - sub_balance(burner, asset(10000, symbol_type(S(4, OREINST)))); + transfer_balances(burner, same_payer, instrument_id); + sub_balance(burner, asset(10000, symbol(symbol_code("OREINST"),4))); _tokens.erase(tokenitr); } -// -CUSTOM_CODE-it replicates the create function of ore.standard_token -// Creates a new currency OREINST -void instrument::create(account_name issuer, +/* + -CUSTOM_CODE- it replicates the create function of ore.standard_token + creates a new currency OREINST +*/ +ACTION instrument::create(name issuer, asset maximum_supply) { require_auth(_self); // Symbol is hardcoded here to prevent creating any other symbol than OREINST // auto sym = "maximum_supply.symbol"; - eosio::symbol_type sym = eosio::string_to_symbol(4, "OREINST"); + eosio::symbol sym = symbol(symbol_code("OREINST"),4); eosio_assert(maximum_supply.symbol == sym, "symbol name must be ORINST"); eosio_assert(sym.is_valid(), "invalid symbol name"); eosio_assert(maximum_supply.is_valid(), "invalid supply"); eosio_assert(maximum_supply.amount > 0, "max-supply must be positive"); - stats statstable(_self, sym.name()); - auto existing = statstable.find(sym.name()); + stats statstable(_self, sym.code().raw()); + auto existing = statstable.find(sym.code().raw()); eosio_assert(existing == statstable.end(), "token with symbol already exists"); statstable.emplace(_self, [&](auto &s) { @@ -442,17 +493,18 @@ void instrument::create(account_name issuer, }); } -// -CUSTOM_CODE-it replicates the issue function of ore.standard_token except the inline transfer action present in ore.standard_token -// issue OREINST to an account -void instrument::issue(account_name to, asset quantity, string memo) +/* + -CUSTOM_CODE-it replicates the issue function of ore.standard_token except the inline transfer action present in ore.standard_token + issue OREINST to an account +*/ +ACTION instrument::issue(name to, asset quantity, string memo) { auto sym = quantity.symbol; eosio_assert(sym.is_valid(), "invalid symbol name"); eosio_assert(memo.size() <= 256, "memo has more than 256 bytes"); - auto sym_name = sym.name(); - stats statstable(_self, sym_name); - auto existing = statstable.find(sym_name); + stats statstable(_self, sym.code().raw()); + auto existing = statstable.find(sym.code().raw()); eosio_assert(existing != statstable.end(), "token with symbol does not exist, create token before issue"); const auto &st = *existing; @@ -463,7 +515,7 @@ void instrument::issue(account_name to, asset quantity, string memo) eosio_assert(quantity.symbol == st.supply.symbol, "symbol precision mismatch"); eosio_assert(quantity.amount <= st.max_supply.amount - st.supply.amount, "quantity exceeds available supply"); - statstable.modify(st, 0, [&](auto &s) { + statstable.modify(st, same_payer, [&](auto &s) { s.supply += quantity; }); @@ -476,12 +528,15 @@ void instrument::issue(account_name to, asset quantity, string memo) } } -// -CUSTOM_CODE-it replicates the sub_balance function of ore.standard_token -void instrument::sub_balance(account_name owner, asset value) +/* + -CUSTOM_CODE-it replicates the sub_balance function of ore.standard_token + removes OREINST from an account + */ +void instrument::sub_balance(name owner, asset value) { - accounts from_acnts(_self, owner); + accounts from_acnts(_self, owner.value); - const auto &from = from_acnts.get(value.symbol.name(), "no balance object found"); + const auto &from = from_acnts.get(value.symbol.code().raw(), "no balance object found"); eosio_assert(from.balance.amount >= value.amount, "overdrawn balance"); if (from.balance.amount == value.amount) @@ -496,34 +551,14 @@ void instrument::sub_balance(account_name owner, asset value) } } -// -CUSTOM_CODE-it replicates the sub_balance_from function of ore.standard_token -// NOTE: Uncomment and use in future if required -// It is used by transfer_from account to specify the RAM payer as the "sender" account and not the "owner" account as in the sub_balance function -// NOTE: used by instrument::approve action -// void instrument::sub_balance_from(account_name sender, account_name owner, asset value) -// { -// accounts from_acnts(_self, owner); - -// const auto &from = from_acnts.get(value.symbol.name(), "no balance object found"); -// eosio_assert(from.balance.amount >= value.amount, "overdrawn balance"); - -// if (from.balance.amount == value.amount) -// { -// from_acnts.erase(from); -// } -// else -// { -// from_acnts.modify(from, sender, [&](auto &a) { -// a.balance -= value; -// }); -// } -// } - -// -CUSTOM_CODE-it replicates the add_balance function of ore.standard_token -void instrument::add_balance(account_name owner, asset value, account_name ram_payer) +/* + -CUSTOM_CODE-it replicates the add_balance function of ore.standard_token + adds OREINST to an account +*/ +void instrument::add_balance(name owner, asset value, name ram_payer) { - accounts to_acnts(_self, owner); - auto to = to_acnts.find(value.symbol.name()); + accounts to_acnts(_self, owner.value); + auto to = to_acnts.find(value.symbol.code().raw()); if (to == to_acnts.end()) { to_acnts.emplace(ram_payer, [&](auto &a) { @@ -532,10 +567,10 @@ void instrument::add_balance(account_name owner, asset value, account_name ram_p } else { - to_acnts.modify(to, 0, [&](auto &a) { + to_acnts.modify(to, same_payer, [&](auto &a) { a.balance += value; }); } } -EOSIO_ABI(instrument, (transfer)(mint)(checkright)(createinst)(update)(revoke)(burn)(create)(issue)) +EOSIO_DISPATCH(instrument, (transfer)(mint)(checkright)(createinst)(update)(revoke)(burn)(create)(issue)) diff --git a/contracts/ore.instrument/ore.instrument.hpp b/contracts/ore.instrument/ore.instrument.hpp index 7108746..eb8c1ab 100644 --- a/contracts/ore.instrument/ore.instrument.hpp +++ b/contracts/ore.instrument/ore.instrument.hpp @@ -4,23 +4,24 @@ #include #include -#include -#include -#include +#include "eosiolib/eosio.hpp" +#include "eosiolib/asset.hpp" +#include "eosiolib/print.hpp" +#include "eosiolib/transaction.hpp" +#include "eosiolib/time.hpp" #include "../ore.rights_registry/ore.rights_registry.hpp" using namespace eosio; using namespace std; -class instrument : public eosio::contract +class [[eosio::contract("ore.instrument")]] instrument : public eosio::contract { public: - instrument(account_name self) - : contract(self), _account(_self, _self), _tokens(_self, _self) {} + instrument( name receiver, name code, datastream ds): contract(receiver, code, ds), _account(receiver, receiver.value), _tokens(receiver, receiver.value) {} struct instrument_data { - account_name issuer; + name issuer; string instrument_class; string description; string instrument_template; @@ -35,13 +36,12 @@ class instrument : public eosio::contract uint8_t mutability; // 0- immutable, 1- only datesi 2- all }; - //@abi table tokens i64 - struct token + TABLE token { //721 standard properties uint64_t id; - account_name owner; - account_name minted_by; + name owner; + name minted_by; uint64_t minted_at; //instrument properties @@ -54,82 +54,68 @@ class instrument : public eosio::contract uint64_t class_hash; uint64_t primary_key() const { return id; } - uint64_t by_owner() const { return owner; } + uint64_t by_owner() const { return owner.value; } uint64_t by_template() const { return template_hash; } uint64_t by_class() const { return class_hash; } EOSLIB_SERIALIZE(token, (id)(owner)(minted_by)(minted_at)(instrument)(revoked)(start_time)(end_time)(template_hash)(class_hash)) }; - eosio::multi_index>, - indexed_by>, - indexed_by>> - _tokens; + typedef eosio::multi_index<"tokens"_n, token, + indexed_by<"owner"_n, const_mem_fun>, + indexed_by<"templatehash"_n, const_mem_fun>, + indexed_by<"classhash"_n, const_mem_fun> + >tokenindex; - //@abi table account i64 - struct accountdata + tokenindex _tokens; + + TABLE accountdata { - account_name owner; + name owner; uint64_t balance; vector instruments; - uint64_t primary_key() const { return owner; } + uint64_t primary_key() const { return owner.value; } EOSLIB_SERIALIZE(accountdata, (owner)(balance)(instruments)) }; - eosio::multi_index _account; + typedef eosio::multi_index<"account"_n, accountdata> accountindex; - // NOTE: Uncomment and use in future if required - // Schema for allowance feature like in ERC-721 - //@abi table allowances i64 - // struct allowancedata - // { - // uint64_t token_id; - // account_name to; - - // uint64_t primary_key() const { return token_id; } - - // EOSLIB_SERIALIZE(allowancedata, (token_id)(to)) - // }; - - // typedef eosio::multi_index allowances; + accountindex _account; private: - //@abi table accounts i64 - struct account + TABLE accountbalance { asset balance; - uint64_t primary_key() const { return balance.symbol.name(); } + uint64_t primary_key() const { return balance.symbol.code().raw(); } }; - //@abi table stat i64 - struct currencystat + TABLE currencystat { asset supply; asset max_supply; - account_name issuer; + name issuer; - uint64_t primary_key() const { return supply.symbol.name(); } + uint64_t primary_key() const { return supply.symbol.code().raw(); } }; - typedef eosio::multi_index accounts; - typedef eosio::multi_index stats; + typedef eosio::multi_index<"accounts"_n, accountbalance> accounts; + typedef eosio::multi_index<"stat"_n, currencystat> stats; - void sub_balance(account_name owner, asset value); - void sub_balance_from(account_name sender, account_name owner, asset value); - void add_balance(account_name owner, asset value, account_name ram_payer); - void transfer_balances(account_name from, account_name to, uint64_t instrument_id, int64_t amount = 1); + void sub_balance(name owner, asset value); + void sub_balance_from(name sender, name owner, asset value); + void add_balance(name owner, asset value, name ram_payer); + void transfer_balances(name from, name to, uint64_t instrument_id, int64_t amount = 1); public: //public utility functions token find_token_by_id(uint64_t id); bool isToken(uint64_t id); token find_token_by_template(string instrument_template); - bool _owns(account_name claimant, uint64_t token_id); + bool _owns(name claimant, uint64_t token_id); uint64_t total_supply(); - uint64_t balance_of(account_name owner); - account_name owner_of(uint64_t token_id); + uint64_t balance_of(name owner); + name owner_of(uint64_t token_id); inline static uint64_t hashStringToInt(const string &strkey) { @@ -137,16 +123,16 @@ class instrument : public eosio::contract } //actions - void approve(account_name from, account_name to, uint64_t token_id); - void mint(account_name minter, account_name owner, instrument_data instrument, uint64_t start_time, uint64_t end_time, uint64_t instrumentId); - void checkright(account_name minter, account_name issuer, string rightname, uint64_t deferred_transaction_id); - void update(account_name updater, string instrument_template, instrument_data instrument, uint64_t instrument_id, uint64_t start_time, uint64_t end_time); - void transfer(account_name sender, account_name to, uint64_t token_id); - void revoke(account_name revoker, uint64_t token_id); - void burn(account_name burner, uint64_t token_id); - void create(account_name issuer, asset maximum_supply); - void createinst(account_name minter, account_name owner, uint64_t instrumentId, instrument_data instrument, uint64_t start_time, uint64_t end_time); - void issue(account_name to, asset quantity, string memo); + ACTION approve(name from, name to, uint64_t token_id); + ACTION mint(name minter, name owner, instrument_data instrument, uint64_t start_time, uint64_t end_time, uint64_t instrumentId); + ACTION checkright(name minter, name issuer, string rightname, uint64_t deferred_transaction_id); + ACTION update(name updater, string instrument_template, instrument_data instrument, uint64_t instrument_id, uint64_t start_time, uint64_t end_time); + ACTION transfer(name sender, name to, uint64_t token_id); + ACTION revoke(name revoker, uint64_t token_id); + ACTION burn(name burner, uint64_t token_id); + ACTION create(name issuer, asset maximum_supply); + ACTION createinst(name minter, name owner, uint64_t instrumentId, instrument_data instrument, uint64_t start_time, uint64_t end_time); + ACTION issue(name to, asset quantity, string memo); }; instrument::token instrument::find_token_by_id(uint64_t id) @@ -181,7 +167,7 @@ bool instrument::isToken(uint64_t id) instrument::token instrument::find_token_by_template(string instrument_template) { - auto hashtable = _tokens.get_index(); + auto hashtable = _tokens.get_index<"templatehash"_n>(); auto item = hashtable.find(hashStringToInt(instrument_template)); if (item == hashtable.end()) eosio_assert(false, "instrument with given template not found"); @@ -198,14 +184,14 @@ instrument::token instrument::find_token_by_template(string instrument_template) } // Return an account's total balance -uint64_t instrument::balance_of(account_name owner) +uint64_t instrument::balance_of(name owner) { - auto account = _account.find(owner); + auto account = _account.find(owner.value); return account->balance; } // Returns who owns a token -account_name instrument::owner_of(uint64_t token_id) +name instrument::owner_of(uint64_t token_id) { auto token = _tokens.find(token_id); return token->owner; @@ -225,28 +211,28 @@ uint64_t instrument::total_supply() } // Check if account owns the token -bool instrument::_owns(account_name claimant, uint64_t token_id) +bool instrument::_owns(name claimant, uint64_t token_id) { return owner_of(token_id) == claimant; } -void instrument::transfer_balances(account_name from, account_name to, uint64_t instrument_id, int64_t amount) +void instrument::transfer_balances(name from, name to, uint64_t instrument_id, int64_t amount) { - auto fromitr = _account.find(from); + auto fromitr = _account.find(from.value); eosio_assert(fromitr != _account.end(), "Sender account doesn't exists"); eosio_assert(fromitr->balance > 0, "Sender account's balance is 0"); - _account.modify(fromitr, 0, [&](auto &a) { + _account.modify(fromitr, same_payer, [&](auto &a) { a.balance -= amount; a.instruments.erase(std::remove(a.instruments.begin(), a.instruments.end(), instrument_id), a.instruments.end()); }); - auto toitr = _account.find(to); + auto toitr = _account.find(to.value); if (toitr != _account.end()) { - _account.modify(toitr, 0, [&](auto &a) { + _account.modify(toitr, same_payer, [&](auto &a) { a.balance += amount; a.instruments.push_back(instrument_id); }); diff --git a/contracts/ore.rights_registry/--url b/contracts/ore.rights_registry/--url new file mode 100644 index 0000000..413349a --- /dev/null +++ b/contracts/ore.rights_registry/--url @@ -0,0 +1,11 @@ + + + + + Error 411 (Length Required)!!1 + + +

411. That’s an error. +

POST requests require a Content-length header. That’s all we know. diff --git a/contracts/ore.rights_registry/ore.rights_registry.cpp b/contracts/ore.rights_registry/ore.rights_registry.cpp index 51e6bec..5d2c9d5 100644 --- a/contracts/ore.rights_registry/ore.rights_registry.cpp +++ b/contracts/ore.rights_registry/ore.rights_registry.cpp @@ -3,17 +3,15 @@ using namespace eosio; // transfer action -void rights_registry::upsertright(account_name owner, string &right_name, vector urls, vector issuer_whitelist) +ACTION rights_registry::upsertright(name owner, string &right_name, vector urls, vector issuer_whitelist) { require_auth(owner); - right_registration_index right_registration(_self, _self); + auto itr = _rights.find(hashStr(right_name)); - auto itr = right_registration.find(hashStr(right_name)); - - if (itr == right_registration.end()) + if (itr == _rights.end()) { - right_registration.emplace(owner, [&](auto &end) { + _rights.emplace(owner, [&](auto &end) { end.id = hashStr(right_name); end.right_name = right_name; end.owner = owner; @@ -21,30 +19,33 @@ void rights_registry::upsertright(account_name owner, string &right_name, vector end.issuer_whitelist = issuer_whitelist; }); - print("emplaces"); + print("action:upsertright Right: " + right_name + " added:" + " by: " + owner.to_string() + "\n"); + } else { - eosio_assert(itr->owner == owner, "You are not the issuer of the existing right name. Update canceled!"); - right_registration.modify(itr, owner, [&](auto &end) { + string msg = "The account " + owner.to_string() + " is not the owner of the right " + right_name + " and cannot modify it."; + eosio_assert(itr->owner == owner, msg.c_str()); + + _rights.modify(itr, owner, [&](auto &end) { end.urls = urls; end.issuer_whitelist = issuer_whitelist; }); - print("modified"); + + print("action:upsertright Right: " + right_name + " modified by: " + owner.to_string() + "\n"); } } -void rights_registry::deleteright(account_name owner, string &right_name) +ACTION rights_registry::deleteright(name owner, string &right_name) { require_auth(owner); - right_registration_index right_registration(_self, _self); + auto itr = _rights.find(hashStr(right_name)); - auto itr = right_registration.find(hashStr(right_name)); + string msg = "The right " + right_name + " doesn't exist "; - eosio_assert(itr != right_registration.end(), "There is no right with that name"); - - right_registration.erase(itr); + eosio_assert(itr != _rights.end(), msg.c_str()); + _rights.erase(itr); } -EOSIO_ABI(rights_registry, (upsertright)(deleteright)) +EOSIO_DISPATCH(rights_registry, (upsertright)(deleteright)) diff --git a/contracts/ore.rights_registry/ore.rights_registry.hpp b/contracts/ore.rights_registry/ore.rights_registry.hpp index 04e021f..602a962 100644 --- a/contracts/ore.rights_registry/ore.rights_registry.hpp +++ b/contracts/ore.rights_registry/ore.rights_registry.hpp @@ -3,37 +3,41 @@ * @copyright defined in eos/LICENSE.txt */ #pragma once +#include -#include +#include "eosiolib/eosio.hpp" #include "../ore_types/ore_types.hpp" + using namespace eosio; using namespace std; -class rights_registry : public contract +class [[eosio::contract("ore.rights_registry")]] rights_registry : public eosio::contract { public: - //@abi table rights i64 - struct right_reg + using contract::contract; + rights_registry( name receiver, name code, datastream ds): contract(receiver, code, ds), _rights(receiver, receiver.value){} + + TABLE right_reg { uint64_t id; string right_name; - account_name owner; + name owner; vector urls; - vector issuer_whitelist; + vector issuer_whitelist; uint64_t primary_key() const { return id; } EOSLIB_SERIALIZE(right_reg, (id)(right_name)(owner)(urls)(issuer_whitelist)) }; - typedef multi_index right_registration_index; - + typedef eosio::multi_index<"rights"_n, right_reg>right_registration_index; + public: - rights_registry(account_name self) - : contract(self) {} + right_registration_index _rights; - void upsertright(account_name owner, string &right_name, vector urls, vector issuer_whitelist); - void deleteright(account_name owner, string &right_name); + ACTION upsertright(name owner, string &right_name, vector urls, vector issuer_whitelist); + + ACTION deleteright(name owner, string &right_name); inline static uint64_t hashStr(const string &strkey) { @@ -42,11 +46,9 @@ class rights_registry : public contract right_reg find_right_by_name(string right_name) { - right_registration_index _endpoints(_self, _self); - - auto rightitr = _endpoints.find(hashStr(right_name)); + auto rightitr = _rights.find(hashStr(right_name)); - if (rightitr == _endpoints.end()) + if (rightitr == _rights.end()) { return right_reg{0}; } diff --git a/contracts/ore.standard_token/ore.standard_token.abi b/contracts/ore.standard_token/ore.standard_token.abi deleted file mode 100644 index 033b53c..0000000 --- a/contracts/ore.standard_token/ore.standard_token.abi +++ /dev/null @@ -1,191 +0,0 @@ -{ - "____comment": "This file was generated by eosio-abigen. DO NOT EDIT - 2018-09-25T20:49:23", - "version": "eosio::abi/1.0", - "types": [], - "structs": [{ - "name": "account", - "base": "", - "fields": [{ - "name": "balance", - "type": "asset" - } - ] - },{ - "name": "currencystat", - "base": "", - "fields": [{ - "name": "supply", - "type": "asset" - },{ - "name": "max_supply", - "type": "asset" - },{ - "name": "issuer", - "type": "name" - } - ] - },{ - "name": "allowance", - "base": "", - "fields": [{ - "name": "to", - "type": "name" - },{ - "name": "quantity", - "type": "asset" - } - ] - },{ - "name": "create", - "base": "", - "fields": [{ - "name": "issuer", - "type": "name" - },{ - "name": "maximum_supply", - "type": "asset" - } - ] - },{ - "name": "issue", - "base": "", - "fields": [{ - "name": "to", - "type": "name" - },{ - "name": "quantity", - "type": "asset" - },{ - "name": "memo", - "type": "string" - } - ] - },{ - "name": "retire", - "base": "", - "fields": [{ - "name": "quantity", - "type": "asset" - },{ - "name": "memo", - "type": "string" - } - ] - },{ - "name": "transfer", - "base": "", - "fields": [{ - "name": "from", - "type": "name" - },{ - "name": "to", - "type": "name" - },{ - "name": "quantity", - "type": "asset" - },{ - "name": "memo", - "type": "string" - } - ] - },{ - "name": "approve", - "base": "", - "fields": [{ - "name": "from", - "type": "name" - },{ - "name": "to", - "type": "name" - },{ - "name": "quantity", - "type": "asset" - },{ - "name": "memo", - "type": "string" - } - ] - },{ - "name": "transferfrom", - "base": "", - "fields": [{ - "name": "sender", - "type": "name" - },{ - "name": "from", - "type": "name" - },{ - "name": "to", - "type": "name" - },{ - "name": "quantity", - "type": "asset" - },{ - "name": "memo", - "type": "string" - } - ] - } - ], - "actions": [{ - "name": "create", - "type": "create", - "ricardian_contract": "" - },{ - "name": "issue", - "type": "issue", - "ricardian_contract": "" - },{ - "name": "retire", - "type": "retire", - "ricardian_contract": "" - },{ - "name": "transfer", - "type": "transfer", - "ricardian_contract": "" - },{ - "name": "approve", - "type": "approve", - "ricardian_contract": "" - },{ - "name": "transferfrom", - "type": "transferfrom", - "ricardian_contract": "" - } - ], - "tables": [{ - "name": "accounts", - "index_type": "i64", - "key_names": [ - "balance" - ], - "key_types": [ - "asset" - ], - "type": "account" - },{ - "name": "stat", - "index_type": "i64", - "key_names": [ - "supply" - ], - "key_types": [ - "asset" - ], - "type": "currencystat" - },{ - "name": "allowances", - "index_type": "i64", - "key_names": [ - "to" - ], - "key_types": [ - "name" - ], - "type": "allowance" - } - ], - "ricardian_clauses": [], - "error_messages": [], - "abi_extensions": [] -} \ No newline at end of file diff --git a/contracts/ore.standard_token/ore.standard_token.cpp b/contracts/ore.standard_token/ore.standard_token.cpp index 7c11dcd..2d70bd6 100644 --- a/contracts/ore.standard_token/ore.standard_token.cpp +++ b/contracts/ore.standard_token/ore.standard_token.cpp @@ -13,12 +13,12 @@ * in the implementation of the same functions in ore.instrument contract. */ -#include +#include "ore.standard_token.hpp" namespace eosio { -void token::create(account_name issuer, +ACTION token::create(name issuer, asset maximum_supply) { require_auth(_self); @@ -28,8 +28,8 @@ void token::create(account_name issuer, eosio_assert(maximum_supply.is_valid(), "invalid supply"); eosio_assert(maximum_supply.amount > 0, "max-supply must be positive"); - stats statstable(_self, sym.name()); - auto existing = statstable.find(sym.name()); + stats statstable(_self, sym.code().raw()); + auto existing = statstable.find(sym.code().raw()); eosio_assert(existing == statstable.end(), "token with symbol already exists"); statstable.emplace(_self, [&](auto &s) { @@ -40,27 +40,26 @@ void token::create(account_name issuer, } // The approve action is called by "from" account to authorize "to" account to call the transferfrom function on it's behalf -void token::approve(account_name from, account_name to, asset quantity, string memo) +ACTION token::approve(name from, name to, asset quantity, string memo) { require_auth(from); - accounts from_acnts(_self, from); + accounts from_acnts(_self, from.value); - const auto &from_account = from_acnts.get(quantity.symbol.name(), "no balance object found"); + const auto &from_account = from_acnts.get(quantity.symbol.code().raw(), "no balance object found"); eosio_assert(from_account.balance.amount >= quantity.amount, "amount being approved is more than the balance of the approver account"); set_allowance(from, to, quantity, true); } -void token::issue(account_name to, asset quantity, string memo) +ACTION token::issue(name to, asset quantity, string memo) { auto sym = quantity.symbol; eosio_assert(sym.is_valid(), "invalid symbol name"); eosio_assert(memo.size() <= 256, "memo has more than 256 bytes"); - auto sym_name = sym.name(); - stats statstable(_self, sym_name); - auto existing = statstable.find(sym_name); + stats statstable(_self, sym.code().raw()); + auto existing = statstable.find(sym.code().raw()); eosio_assert(existing != statstable.end(), "token with symbol does not exist, create token before issue"); const auto &st = *existing; @@ -71,7 +70,7 @@ void token::issue(account_name to, asset quantity, string memo) eosio_assert(quantity.symbol == st.supply.symbol, "symbol precision mismatch"); eosio_assert(quantity.amount <= st.max_supply.amount - st.supply.amount, "quantity exceeds available supply"); - statstable.modify(st, 0, [&](auto &s) { + statstable.modify(st, same_payer, [&](auto &s) { s.supply += quantity; }); @@ -79,19 +78,18 @@ void token::issue(account_name to, asset quantity, string memo) if (to != st.issuer) { - SEND_INLINE_ACTION(*this, transfer, {st.issuer, N(active)}, {st.issuer, to, quantity, memo}); + SEND_INLINE_ACTION(*this, transfer, {st.issuer, "active"_n}, {st.issuer, to, quantity, memo}); } } -void token::retire(asset quantity, string memo) +ACTION token::retire(asset quantity, string memo) { auto sym = quantity.symbol; eosio_assert(sym.is_valid(), "invalid symbol name"); eosio_assert(memo.size() <= 256, "memo has more than 256 bytes"); - auto sym_name = sym.name(); - stats statstable(_self, sym_name); - auto existing = statstable.find(sym_name); + stats statstable(_self, sym.code().raw()); + auto existing = statstable.find(sym.code().raw()); eosio_assert(existing != statstable.end(), "token with symbol does not exist"); const auto &st = *existing; @@ -101,24 +99,24 @@ void token::retire(asset quantity, string memo) eosio_assert(quantity.symbol == st.supply.symbol, "symbol precision mismatch"); - statstable.modify(st, 0, [&](auto &s) { + statstable.modify(st, same_payer, [&](auto &s) { s.supply -= quantity; }); sub_balance(st.issuer, quantity); } -void token::transfer(account_name from, - account_name to, +ACTION token::transfer(name from, + name to, asset quantity, string memo) { eosio_assert(from != to, "cannot transfer to self"); require_auth(from); eosio_assert(is_account(to), "to account does not exist"); - auto sym = quantity.symbol.name(); - stats statstable(_self, sym); - const auto &st = statstable.get(sym); + auto sym = quantity.symbol.code(); + stats statstable(_self, sym.raw()); + const auto &st = statstable.get(sym.raw()); require_recipient(from); require_recipient(to); @@ -128,12 +126,14 @@ void token::transfer(account_name from, eosio_assert(quantity.symbol == st.supply.symbol, "symbol precision mismatch"); eosio_assert(memo.size() <= 256, "memo has more than 256 bytes"); + auto payer = has_auth(to) ? to : from; + sub_balance(from, quantity); - add_balance(to, quantity, from); + add_balance(to, quantity, payer); } // This action is called by the approved "sender" account on behalf of the "from" account to transfer "quantity" to "to" account -void token::transferfrom(account_name sender, account_name from, account_name to, asset quantity, string memo) +ACTION token::transferfrom(name sender, name from, name to, asset quantity, string memo) { require_auth(sender); @@ -153,18 +153,13 @@ void token::transferfrom(account_name sender, account_name from, account_name to } // eosio.token standard sub_balance function -void token::sub_balance(account_name owner, asset value) +void token::sub_balance(name owner, asset value) { - accounts from_acnts(_self, owner); + accounts from_acnts(_self, owner.value); - const auto &from = from_acnts.get(value.symbol.name(), "no balance object found"); + const auto &from = from_acnts.get(value.symbol.code().raw(), "no balance object found"); eosio_assert(from.balance.amount >= value.amount, "overdrawn balance"); - if (from.balance.amount == value.amount) - { - from_acnts.erase(from); - } - else { from_acnts.modify(from, owner, [&](auto &a) { a.balance -= value; @@ -173,29 +168,22 @@ void token::sub_balance(account_name owner, asset value) } // It is used by transfer_from account to specify the RAM payer as the "sender" account and not the "owner" account as in the sub_balance function -void token::sub_balance_from(account_name sender, account_name owner, asset value) +void token::sub_balance_from(name sender, name owner, asset value) { - accounts from_acnts(_self, owner); + accounts from_acnts(_self, owner.value); - const auto &from = from_acnts.get(value.symbol.name(), "no balance object found"); + const auto &from = from_acnts.get(value.symbol.code().raw(), "no balance object found"); eosio_assert(from.balance.amount >= value.amount, "overdrawn balance"); - if (from.balance.amount == value.amount) - { - from_acnts.erase(from); - } - else - { - from_acnts.modify(from, sender, [&](auto &a) { - a.balance -= value; - }); - } + from_acnts.modify(from, sender, [&](auto &a) { + a.balance -= value; + }); } -void token::add_balance(account_name owner, asset value, account_name ram_payer) +void token::add_balance(name owner, asset value, name ram_payer) { - accounts to_acnts(_self, owner); - auto to = to_acnts.find(value.symbol.name()); + accounts to_acnts(_self, owner.value); + auto to = to_acnts.find(value.symbol.code().raw()); if (to == to_acnts.end()) { to_acnts.emplace(ram_payer, [&](auto &a) { @@ -204,12 +192,42 @@ void token::add_balance(account_name owner, asset value, account_name ram_payer) } else { - to_acnts.modify(to, 0, [&](auto &a) { + to_acnts.modify(to, same_payer, [&](auto &a) { a.balance += value; }); } } +ACTION token::open(name owner, const symbol &symbol, name ram_payer) +{ + require_auth(ram_payer); + + auto sym_code_raw = symbol.code().raw(); + + stats statstable(_self, sym_code_raw); + const auto &st = statstable.get(sym_code_raw, "symbol does not exist"); + eosio_assert(st.supply.symbol == symbol, "symbol precision mismatch"); + + accounts acnts(_self, owner.value); + auto it = acnts.find(sym_code_raw); + if (it == acnts.end()) + { + acnts.emplace(ram_payer, [&](auto &a) { + a.balance = asset{0, symbol}; + }); + } +} + +ACTION token::close(name owner, const symbol &symbol) +{ + require_auth(owner); + accounts acnts(_self, owner.value); + auto it = acnts.find(symbol.code().raw()); + eosio_assert(it != acnts.end(), "Balance row already deleted or never existed. Action won't have any effect."); + eosio_assert(it->balance.amount == 0, "Cannot close because the balance is not zero."); + acnts.erase(it); +} + } // namespace eosio -EOSIO_ABI(eosio::token, (create)(issue)(transfer)(approve)(transferfrom)(retire)) \ No newline at end of file +EOSIO_DISPATCH( eosio::token, (create)(issue)(transfer)(approve)(transferfrom)(open)(close)(retire)) \ No newline at end of file diff --git a/contracts/ore.standard_token/ore.standard_token.hpp b/contracts/ore.standard_token/ore.standard_token.hpp index 60faa08..2aa875f 100644 --- a/contracts/ore.standard_token/ore.standard_token.hpp +++ b/contracts/ore.standard_token/ore.standard_token.hpp @@ -4,8 +4,8 @@ */ #pragma once -#include -#include +#include "eosiolib/asset.hpp" +#include "eosiolib/eosio.hpp" #include @@ -19,111 +19,105 @@ namespace eosio using std::string; -class token : public contract +class[[eosio::contract("ore.standard_token")]] token : public contract { public: - token(account_name self) : contract(self) {} + using contract::contract; - void create(account_name issuer, - asset maximum_supply); + ACTION create(name issuer, asset maximum_supply); - void issue(account_name to, asset quantity, string memo); + ACTION issue(name to, asset quantity, string memo); - void retire(asset quantity, string memo); + ACTION retire(asset quantity, string memo); - void transfer(account_name from, - account_name to, - asset quantity, - string memo); + ACTION transfer(name from, name to, asset quantity, string memo); - void approve(account_name from, account_name to, asset quantity, string memo); + ACTION approve(name from, name to, asset quantity, string memo); - void transferfrom(account_name sender, account_name from, account_name to, asset quantity, string memo); + ACTION transferfrom(name sender, name from, name to, asset quantity, string memo); - inline asset get_supply(symbol_name sym) const; + ACTION open(name owner, const symbol &symbol, name ram_payer); - inline asset get_balance(account_name owner, symbol_name sym) const; + ACTION close(name owner, const symbol &symbol); - inline asset allowance_of(account_name from, account_name to); + static asset get_supply( name token_contract_account, symbol_code sym_code ) + { + stats statstable( token_contract_account, sym_code.raw() ); + const auto& st = statstable.get( sym_code.raw() ); + return st.supply; + } + + static asset get_balance( name token_contract_account, name owner, symbol_code sym_code ) + { + accounts accountstable( token_contract_account, owner.value ); + const auto& ac = accountstable.get( sym_code.raw() ); + return ac.balance; + } + + inline asset allowance_of(name from, name to); private: - inline void set_allowance(account_name from, account_name to, asset quantity, bool increment = false); + inline void set_allowance(name from, name to, asset quantity, bool increment = false); - //@abi table accounts i64 - struct account + TABLE account { asset balance; - uint64_t primary_key() const { return balance.symbol.name(); } + uint64_t primary_key() const { return balance.symbol.code().raw(); } }; - //@abi table stat i64 - struct currencystat + + TABLE currencystat { asset supply; asset max_supply; - account_name issuer; + name issuer; - uint64_t primary_key() const { return supply.symbol.name(); } + uint64_t primary_key() const { return supply.symbol.code().raw(); } }; - //@abi table allowances i64 - struct allowance + TABLE allowance { - account_name to; + name to; asset quantity; - uint64_t primary_key() const { return to; } + uint64_t primary_key() const { return to.value; } EOSLIB_SERIALIZE(allowance, (to)(quantity)) }; - typedef eosio::multi_index _allowances; - typedef eosio::multi_index accounts; - typedef eosio::multi_index stats; + typedef eosio::multi_index<"allowances"_n, allowance> _allowances; + typedef eosio::multi_index<"accounts"_n, account> accounts; + typedef eosio::multi_index<"stat"_n, currencystat> stats; - void sub_balance(account_name owner, asset value); - void sub_balance_from(account_name sender, account_name owner, asset value); - void add_balance(account_name owner, asset value, account_name ram_payer); + void sub_balance(name owner, asset value); + void sub_balance_from(name sender, name owner, asset value); + void add_balance(name owner, asset value, name ram_payer); public: struct transfer_args { - account_name from; - account_name to; + name from; + name to; asset quantity; string memo; }; }; -asset token::get_supply(symbol_name sym) const -{ - stats statstable(_self, sym); - const auto &st = statstable.get(sym); - return st.supply; -} - -asset token::get_balance(account_name owner, symbol_name sym) const -{ - accounts accountstable(_self, owner); - const auto &ac = accountstable.get(sym); - return ac.balance; -} - -void token::set_allowance(account_name from, account_name to, asset quantity, bool increment) +void token::set_allowance(name from, name to, asset quantity, bool increment) { - auto sym = quantity.symbol.name(); - stats statstable(_self, sym); - const auto &st = statstable.get(sym); + auto sym = quantity.symbol.code(); + stats statstable(_self, sym.raw()); + const auto &st = statstable.get(sym.raw()); eosio_assert(quantity.is_valid(), "invalid quantity"); eosio_assert(quantity.amount >= 0, "must transfer positive quantity"); eosio_assert(quantity.symbol == st.supply.symbol, "symbol precision mismatch"); - account_name key = to; + name key = to; - _allowances allowances(_self, from); + _allowances allowances(_self, from.value); - auto allowanceitr = allowances.find(key); + auto allowanceitr = allowances.find(key.value); if (allowanceitr == allowances.end()) { @@ -134,7 +128,7 @@ void token::set_allowance(account_name from, account_name to, asset quantity, bo } else { - allowances.modify(allowanceitr, 0, [&](auto &a) { + allowances.modify(allowanceitr, same_payer, [&](auto &a) { if (!increment) a.quantity = quantity; else @@ -143,11 +137,11 @@ void token::set_allowance(account_name from, account_name to, asset quantity, bo } } -asset token::allowance_of(account_name from, account_name to) +asset token::allowance_of(name from, name to) { - _allowances allowances(_self, from); + _allowances allowances(_self, from.value); - auto allowanceitr = allowances.find(to); + auto allowanceitr = allowances.find(to.value); eosio_assert(allowanceitr != allowances.end(), "no allowance approved for this account"); diff --git a/contracts/ore.standard_token/ore.standard_token.wasm b/contracts/ore.standard_token/ore.standard_token.wasm deleted file mode 100644 index baf356c..0000000 Binary files a/contracts/ore.standard_token/ore.standard_token.wasm and /dev/null differ diff --git a/contracts/ore.standard_token/ore.standard_token.wast b/contracts/ore.standard_token/ore.standard_token.wast deleted file mode 100644 index 7edfda5..0000000 --- a/contracts/ore.standard_token/ore.standard_token.wast +++ /dev/null @@ -1,17866 +0,0 @@ -(module - (type $FUNCSIG$viji (func (param i32 i64 i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vijjjii (func (param i32 i64 i64 i64 i32 i32))) - (type $FUNCSIG$vijjii (func (param i32 i64 i64 i32 i32))) - (type $FUNCSIG$vijii (func (param i32 i64 i32 i32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$j (func (result i64))) - (type $FUNCSIG$vjj (func (param i64 i64))) - (type $FUNCSIG$vj (func (param i64))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$ijjjj (func (param i64 i64 i64 i64) (result i32))) - (type $FUNCSIG$ijjjjii (func (param i64 i64 i64 i64 i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ij (func (param i64) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $abort)) - (import "env" "action_data_size" (func $action_data_size (result i32))) - (import "env" "current_receiver" (func $current_receiver (result i64))) - (import "env" "current_time" (func $current_time (result i64))) - (import "env" "db_find_i64" (func $db_find_i64 (param i64 i64 i64 i64) (result i32))) - (import "env" "db_get_i64" (func $db_get_i64 (param i32 i32 i32) (result i32))) - (import "env" "db_remove_i64" (func $db_remove_i64 (param i32))) - (import "env" "db_store_i64" (func $db_store_i64 (param i64 i64 i64 i64 i32 i32) (result i32))) - (import "env" "db_update_i64" (func $db_update_i64 (param i32 i64 i32 i32))) - (import "env" "eosio_assert" (func $eosio_assert (param i32 i32))) - (import "env" "is_account" (func $is_account (param i64) (result i32))) - (import "env" "memcpy" (func $memcpy (param i32 i32 i32) (result i32))) - (import "env" "printi" (func $printi (param i64))) - (import "env" "printn" (func $printn (param i64))) - (import "env" "prints" (func $prints (param i32))) - (import "env" "prints_l" (func $prints_l (param i32 i32))) - (import "env" "printui" (func $printui (param i64))) - (import "env" "read_action_data" (func $read_action_data (param i32 i32) (result i32))) - (import "env" "require_auth" (func $require_auth (param i64))) - (import "env" "require_auth2" (func $require_auth2 (param i64 i64))) - (import "env" "require_recipient" (func $require_recipient (param i64))) - (import "env" "send_inline" (func $send_inline (param i32 i32))) - (table 7 7 anyfunc) - (elem (i32.const 0) $__wasm_nullptr $_ZN5eosio5token12transferfromEyyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE $_ZN5eosio5token6createEyNS_5assetE $_ZN5eosio5token6retireENS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE $_ZN5eosio5token8transferEyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE $_ZN5eosio5token7approveEyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE $_ZN5eosio5token5issueEyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE) - (memory $0 1) - (data (i32.const 4) "\f0h\00\00") - (data (i32.const 16) "invalid symbol name\00") - (data (i32.const 48) "invalid supply\00") - (data (i32.const 64) "max-supply must be positive\00") - (data (i32.const 96) "object passed to iterator_to is not in multi_index\00") - (data (i32.const 160) "token with symbol already exists\00") - (data (i32.const 208) "cannot create objects in table of another contract\00") - (data (i32.const 272) "write\00") - (data (i32.const 288) "magnitude of asset amount must be less than 2^62\00") - (data (i32.const 352) "error reading iterator\00") - (data (i32.const 384) "read\00") - (data (i32.const 400) "no balance object found\00") - (data (i32.const 432) "amount being approved is more than the balance of the approver account\00") - (data (i32.const 512) "unable to find key\00") - (data (i32.const 544) "invalid quantity\00") - (data (i32.const 576) "must transfer positive quantity\00") - (data (i32.const 608) "symbol precision mismatch\00") - (data (i32.const 640) "cannot pass end iterator to modify\00") - (data (i32.const 688) "object passed to modify is not in multi_index\00") - (data (i32.const 736) "cannot modify objects in table of another contract\00") - (data (i32.const 800) "attempt to add asset with different symbol\00") - (data (i32.const 848) "addition underflow\00") - (data (i32.const 880) "addition overflow\00") - (data (i32.const 912) "updater cannot change primary key when modifying an object\00") - (data (i32.const 976) "memo has more than 256 bytes\00") - (data (i32.const 1008) "token with symbol does not exist, create token before issue\00") - (data (i32.const 1072) "must issue positive quantity\00") - (data (i32.const 1104) "quantity exceeds available supply\00") - (data (i32.const 1152) "active\00") - (data (i32.const 1168) "token with symbol does not exist\00") - (data (i32.const 1216) "must retire positive quantity\00") - (data (i32.const 1248) "attempt to subtract asset with different symbol\00") - (data (i32.const 1296) "subtraction underflow\00") - (data (i32.const 1328) "subtraction overflow\00") - (data (i32.const 1360) "overdrawn balance\00") - (data (i32.const 1392) "object passed to erase is not in multi_index\00") - (data (i32.const 1440) "cannot erase objects in table of another contract\00") - (data (i32.const 1504) "attempt to remove object that was not in multi_index\00") - (data (i32.const 1568) "cannot transfer to self\00") - (data (i32.const 1600) "to account does not exist\00") - (data (i32.const 1632) "The approved account \00") - (data (i32.const 1664) " is transferring \00") - (data (i32.const 1696) " from \00") - (data (i32.const 1712) " to \00") - (data (i32.const 1728) "the amount being transferred is more than the approved amount\00") - (data (i32.const 1792) ".\00") - (data (i32.const 1808) " \00") - (data (i32.const 1824) ",\00") - (data (i32.const 1840) "no allowance approved for this account\00") - (data (i32.const 1888) "onerror\00") - (data (i32.const 1904) "eosio\00") - (data (i32.const 1920) "onerror action\'s are only valid from the \"eosio\" system account\00") - (data (i32.const 1984) "get\00") - (data (i32.const 10384) "malloc_from_freed was designed to only be called after _heap was completely allocated\00") - (export "memory" (memory $0)) - (export "_ZeqRK11checksum256S1_" (func $_ZeqRK11checksum256S1_)) - (export "_ZeqRK11checksum160S1_" (func $_ZeqRK11checksum160S1_)) - (export "_ZneRK11checksum160S1_" (func $_ZneRK11checksum160S1_)) - (export "now" (func $now)) - (export "_ZN5eosio12require_authERKNS_16permission_levelE" (func $_ZN5eosio12require_authERKNS_16permission_levelE)) - (export "_ZN5eosio5token6createEyNS_5assetE" (func $_ZN5eosio5token6createEyNS_5assetE)) - (export "_ZN5eosio5token7approveEyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE" (func $_ZN5eosio5token7approveEyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE)) - (export "_ZN5eosio5token5issueEyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE" (func $_ZN5eosio5token5issueEyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE)) - (export "_ZN5eosio5token11add_balanceEyNS_5assetEy" (func $_ZN5eosio5token11add_balanceEyNS_5assetEy)) - (export "_ZN5eosio5token6retireENS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE" (func $_ZN5eosio5token6retireENS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE)) - (export "_ZN5eosio5token11sub_balanceEyNS_5assetE" (func $_ZN5eosio5token11sub_balanceEyNS_5assetE)) - (export "_ZN5eosio5token8transferEyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE" (func $_ZN5eosio5token8transferEyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE)) - (export "_ZN5eosio5token12transferfromEyyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE" (func $_ZN5eosio5token12transferfromEyyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE)) - (export "_ZN5eosio5token16sub_balance_fromEyyNS_5assetE" (func $_ZN5eosio5token16sub_balance_fromEyyNS_5assetE)) - (export "apply" (func $apply)) - (export "malloc" (func $malloc)) - (export "free" (func $free)) - (export "memcmp" (func $memcmp)) - (func $_ZeqRK11checksum256S1_ (param $0 i32) (param $1 i32) (result i32) - (i32.eqz - (call $memcmp - (get_local $0) - (get_local $1) - (i32.const 32) - ) - ) - ) - (func $_ZeqRK11checksum160S1_ (param $0 i32) (param $1 i32) (result i32) - (i32.eqz - (call $memcmp - (get_local $0) - (get_local $1) - (i32.const 32) - ) - ) - ) - (func $_ZneRK11checksum160S1_ (param $0 i32) (param $1 i32) (result i32) - (i32.ne - (call $memcmp - (get_local $0) - (get_local $1) - (i32.const 32) - ) - (i32.const 0) - ) - ) - (func $now (result i32) - (i32.wrap/i64 - (i64.div_u - (call $current_time) - (i64.const 1000000) - ) - ) - ) - (func $_ZN5eosio12require_authERKNS_16permission_levelE (param $0 i32) - (call $require_auth2 - (i64.load - (get_local $0) - ) - (i64.load offset=8 - (get_local $0) - ) - ) - ) - (func $_ZN5eosio5token6createEyNS_5assetE (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i64) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $9 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 128) - ) - ) - ) - (call $require_auth - (i64.load - (get_local $0) - ) - ) - (set_local $8 - (i32.const 0) - ) - (set_local $7 - (tee_local $4 - (i64.shr_u - (tee_local $3 - (i64.load offset=8 - (get_local $2) - ) - ) - (i64.const 8) - ) - ) - ) - (block $label$0 - (block $label$1 - (loop $label$2 - (br_if $label$1 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $7) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$3 - (br_if $label$3 - (i64.ne - (i64.and - (tee_local $7 - (i64.shr_u - (get_local $7) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$4 - (br_if $label$1 - (i64.ne - (i64.and - (tee_local $7 - (i64.shr_u - (get_local $7) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$4 - (i32.lt_s - (tee_local $8 - (i32.add - (get_local $8) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $6 - (i32.const 1) - ) - (br_if $label$2 - (i32.lt_s - (tee_local $8 - (i32.add - (get_local $8) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$0) - ) - ) - (set_local $6 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $6) - (i32.const 16) - ) - (set_local $6 - (i32.const 0) - ) - (block $label$5 - (br_if $label$5 - (i64.gt_u - (i64.add - (tee_local $5 - (i64.load - (get_local $2) - ) - ) - (i64.const 4611686018427387903) - ) - (i64.const 9223372036854775806) - ) - ) - (set_local $8 - (i32.const 0) - ) - (set_local $7 - (get_local $4) - ) - (block $label$6 - (loop $label$7 - (br_if $label$6 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $7) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$8 - (br_if $label$8 - (i64.ne - (i64.and - (tee_local $7 - (i64.shr_u - (get_local $7) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$9 - (br_if $label$6 - (i64.ne - (i64.and - (tee_local $7 - (i64.shr_u - (get_local $7) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$9 - (i32.lt_s - (tee_local $8 - (i32.add - (get_local $8) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $6 - (i32.const 1) - ) - (br_if $label$7 - (i32.lt_s - (tee_local $8 - (i32.add - (get_local $8) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$5) - ) - ) - (set_local $6 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $6) - (i32.const 48) - ) - (call $eosio_assert - (i64.gt_s - (get_local $5) - (i64.const 0) - ) - (i32.const 64) - ) - (i32.store - (i32.add - (i32.add - (get_local $9) - (i32.const 8) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (i64.store offset=24 - (get_local $9) - (i64.const -1) - ) - (i64.store offset=32 - (get_local $9) - (i64.const 0) - ) - (i64.store offset=8 - (get_local $9) - (tee_local $7 - (i64.load - (get_local $0) - ) - ) - ) - (i64.store offset=16 - (get_local $9) - (get_local $4) - ) - (block $label$10 - (block $label$11 - (br_if $label$11 - (i32.lt_s - (tee_local $8 - (call $db_find_i64 - (get_local $7) - (get_local $4) - (i64.const -4157508551318700032) - (get_local $4) - ) - ) - (i32.const 0) - ) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=40 - (call $_ZNK5eosio11multi_indexILy14289235522390851584ENS_5token12currencystatEJEE31load_object_by_primary_iteratorEl - (i32.add - (get_local $9) - (i32.const 8) - ) - (get_local $8) - ) - ) - (i32.add - (get_local $9) - (i32.const 8) - ) - ) - (i32.const 96) - ) - (set_local $8 - (i32.const 0) - ) - (br $label$10) - ) - (set_local $8 - (i32.const 1) - ) - ) - (call $eosio_assert - (get_local $8) - (i32.const 160) - ) - (set_local $4 - (i64.load - (get_local $0) - ) - ) - (call $eosio_assert - (i64.eq - (i64.load offset=8 - (get_local $9) - ) - (call $current_receiver) - ) - (i32.const 208) - ) - (drop - (call $_ZN5eosio5token12currencystatC2Ev - (tee_local $8 - (call $_Znwj - (i32.const 56) - ) - ) - ) - ) - (i32.store offset=40 - (get_local $8) - (i32.add - (get_local $9) - (i32.const 8) - ) - ) - (i64.store offset=8 - (get_local $8) - (get_local $3) - ) - (i32.store - (i32.add - (get_local $8) - (i32.const 28) - ) - (i32.load - (i32.add - (get_local $2) - (i32.const 12) - ) - ) - ) - (i32.store - (i32.add - (get_local $8) - (i32.const 24) - ) - (i32.load - (i32.add - (get_local $2) - (i32.const 8) - ) - ) - ) - (i32.store - (i32.add - (get_local $8) - (i32.const 20) - ) - (i32.load - (i32.add - (get_local $2) - (i32.const 4) - ) - ) - ) - (i32.store offset=16 - (get_local $8) - (i32.load - (get_local $2) - ) - ) - (i64.store offset=32 - (get_local $8) - (get_local $1) - ) - (i32.store offset=96 - (get_local $9) - (i32.add - (i32.add - (get_local $9) - (i32.const 48) - ) - (i32.const 40) - ) - ) - (i32.store offset=92 - (get_local $9) - (i32.add - (get_local $9) - (i32.const 48) - ) - ) - (i32.store offset=88 - (get_local $9) - (i32.add - (get_local $9) - (i32.const 48) - ) - ) - (i32.store offset=104 - (get_local $9) - (i32.add - (get_local $9) - (i32.const 88) - ) - ) - (i32.store offset=116 - (get_local $9) - (i32.add - (get_local $8) - (i32.const 16) - ) - ) - (i32.store offset=112 - (get_local $9) - (get_local $8) - ) - (i32.store offset=120 - (get_local $9) - (i32.add - (get_local $8) - (i32.const 32) - ) - ) - (call $_ZN5boost3pfr6detail19for_each_field_implINS1_14sequence_tuple5tupleIJRKN5eosio5assetES8_RKyEEEZNS5_lsINS5_10datastreamIPcEENS5_5token12currencystatELPv0EEERT_SK_RKT0_EUlRKSJ_E_JLj0ELj1ELj2EEEEvSK_OSL_NSt3__116integer_sequenceIjJXspT1_EEEENSS_17integral_constantIbLb0EEE - (i32.add - (get_local $9) - (i32.const 112) - ) - (i32.add - (get_local $9) - (i32.const 104) - ) - ) - (i32.store offset=44 - (get_local $8) - (tee_local $6 - (call $db_store_i64 - (i64.load - (i32.add - (i32.add - (get_local $9) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (i64.const -4157508551318700032) - (get_local $4) - (tee_local $7 - (i64.shr_u - (i64.load offset=8 - (get_local $8) - ) - (i64.const 8) - ) - ) - (i32.add - (get_local $9) - (i32.const 48) - ) - (i32.const 40) - ) - ) - ) - (block $label$12 - (br_if $label$12 - (i64.lt_u - (get_local $7) - (i64.load - (tee_local $2 - (i32.add - (i32.add - (get_local $9) - (i32.const 8) - ) - (i32.const 16) - ) - ) - ) - ) - ) - (i64.store - (get_local $2) - (i64.add - (get_local $7) - (i64.const 1) - ) - ) - ) - (i32.store offset=112 - (get_local $9) - (get_local $8) - ) - (i64.store offset=48 - (get_local $9) - (tee_local $7 - (i64.shr_u - (i64.load - (i32.add - (get_local $8) - (i32.const 8) - ) - ) - (i64.const 8) - ) - ) - ) - (i32.store offset=88 - (get_local $9) - (get_local $6) - ) - (block $label$13 - (block $label$14 - (br_if $label$14 - (i32.ge_u - (tee_local $2 - (i32.load - (i32.add - (i32.add - (get_local $9) - (i32.const 8) - ) - (i32.const 28) - ) - ) - ) - (i32.load - (i32.add - (get_local $9) - (i32.const 40) - ) - ) - ) - ) - (i64.store offset=8 - (get_local $2) - (get_local $7) - ) - (i32.store offset=16 - (get_local $2) - (get_local $6) - ) - (i32.store offset=112 - (get_local $9) - (i32.const 0) - ) - (i32.store - (get_local $2) - (get_local $8) - ) - (i32.store - (i32.add - (get_local $9) - (i32.const 36) - ) - (i32.add - (get_local $2) - (i32.const 24) - ) - ) - (br $label$13) - ) - (call $_ZNSt3__16vectorIN5eosio11multi_indexILy14289235522390851584ENS1_5token12currencystatEJEE8item_ptrENS_9allocatorIS6_EEE24__emplace_back_slow_pathIJNS_10unique_ptrINS5_4itemENS_14default_deleteISC_EEEERyRlEEEvDpOT_ - (i32.add - (get_local $9) - (i32.const 32) - ) - (i32.add - (get_local $9) - (i32.const 112) - ) - (i32.add - (get_local $9) - (i32.const 48) - ) - (i32.add - (get_local $9) - (i32.const 88) - ) - ) - ) - (set_local $8 - (i32.load offset=112 - (get_local $9) - ) - ) - (i32.store offset=112 - (get_local $9) - (i32.const 0) - ) - (block $label$15 - (br_if $label$15 - (i32.eqz - (get_local $8) - ) - ) - (call $_ZdlPv - (get_local $8) - ) - ) - (block $label$16 - (br_if $label$16 - (i32.eqz - (tee_local $6 - (i32.load offset=32 - (get_local $9) - ) - ) - ) - ) - (block $label$17 - (block $label$18 - (br_if $label$18 - (i32.eq - (tee_local $8 - (i32.load - (tee_local $0 - (i32.add - (get_local $9) - (i32.const 36) - ) - ) - ) - ) - (get_local $6) - ) - ) - (loop $label$19 - (set_local $2 - (i32.load - (tee_local $8 - (i32.add - (get_local $8) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $8) - (i32.const 0) - ) - (block $label$20 - (br_if $label$20 - (i32.eqz - (get_local $2) - ) - ) - (call $_ZdlPv - (get_local $2) - ) - ) - (br_if $label$19 - (i32.ne - (get_local $6) - (get_local $8) - ) - ) - ) - (set_local $8 - (i32.load - (i32.add - (get_local $9) - (i32.const 32) - ) - ) - ) - (br $label$17) - ) - (set_local $8 - (get_local $6) - ) - ) - (i32.store - (get_local $0) - (get_local $6) - ) - (call $_ZdlPv - (get_local $8) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $9) - (i32.const 128) - ) - ) - ) - (func $_ZNK5eosio11multi_indexILy14289235522390851584ENS_5token12currencystatEJEE31load_object_by_primary_iteratorEl (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (set_local $8 - (tee_local $9 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 48) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (get_local $9) - ) - (block $label$0 - (br_if $label$0 - (i32.eq - (tee_local $7 - (i32.load - (i32.add - (get_local $0) - (i32.const 28) - ) - ) - ) - (tee_local $2 - (i32.load offset=24 - (get_local $0) - ) - ) - ) - ) - (set_local $3 - (i32.sub - (i32.const 0) - (get_local $2) - ) - ) - (set_local $6 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - (loop $label$1 - (br_if $label$0 - (i32.eq - (i32.load - (i32.add - (get_local $6) - (i32.const 16) - ) - ) - (get_local $1) - ) - ) - (set_local $7 - (get_local $6) - ) - (set_local $6 - (tee_local $4 - (i32.add - (get_local $6) - (i32.const -24) - ) - ) - ) - (br_if $label$1 - (i32.ne - (i32.add - (get_local $4) - (get_local $3) - ) - (i32.const -24) - ) - ) - ) - ) - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.eq - (get_local $7) - (get_local $2) - ) - ) - (set_local $6 - (i32.load - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - ) - (br $label$2) - ) - (call $eosio_assert - (i32.xor - (i32.shr_u - (tee_local $6 - (call $db_get_i64 - (get_local $1) - (i32.const 0) - (i32.const 0) - ) - ) - (i32.const 31) - ) - (i32.const 1) - ) - (i32.const 352) - ) - (block $label$4 - (block $label$5 - (br_if $label$5 - (i32.lt_u - (get_local $6) - (i32.const 513) - ) - ) - (set_local $4 - (call $malloc - (get_local $6) - ) - ) - (br $label$4) - ) - (i32.store offset=4 - (i32.const 0) - (tee_local $4 - (i32.sub - (get_local $9) - (i32.and - (i32.add - (get_local $6) - (i32.const 15) - ) - (i32.const -16) - ) - ) - ) - ) - ) - (drop - (call $db_get_i64 - (get_local $1) - (get_local $4) - (get_local $6) - ) - ) - (i32.store offset=12 - (get_local $8) - (get_local $4) - ) - (i32.store offset=8 - (get_local $8) - (get_local $4) - ) - (i32.store offset=16 - (get_local $8) - (i32.add - (get_local $4) - (get_local $6) - ) - ) - (block $label$6 - (br_if $label$6 - (i32.lt_u - (get_local $6) - (i32.const 513) - ) - ) - (call $free - (get_local $4) - ) - ) - (drop - (call $_ZN5eosio5token12currencystatC2Ev - (tee_local $6 - (call $_Znwj - (i32.const 56) - ) - ) - ) - ) - (i32.store offset=40 - (get_local $6) - (get_local $0) - ) - (i32.store offset=24 - (get_local $8) - (i32.add - (get_local $8) - (i32.const 8) - ) - ) - (i32.store offset=36 - (get_local $8) - (i32.add - (get_local $6) - (i32.const 16) - ) - ) - (i32.store offset=32 - (get_local $8) - (get_local $6) - ) - (i32.store offset=40 - (get_local $8) - (i32.add - (get_local $6) - (i32.const 32) - ) - ) - (call $_ZN5boost3pfr6detail19for_each_field_implINS1_14sequence_tuple5tupleIJRN5eosio5assetES7_RyEEEZNS5_rsINS5_10datastreamIPKcEENS5_5token12currencystatELPv0EEERT_SJ_RT0_EUlSJ_E_JLj0ELj1ELj2EEEEvSJ_OSK_NSt3__116integer_sequenceIjJXspT1_EEEENSO_17integral_constantIbLb0EEE - (i32.add - (get_local $8) - (i32.const 32) - ) - (i32.add - (get_local $8) - (i32.const 24) - ) - ) - (i32.store offset=44 - (get_local $6) - (get_local $1) - ) - (i32.store offset=24 - (get_local $8) - (get_local $6) - ) - (i64.store offset=32 - (get_local $8) - (tee_local $5 - (i64.shr_u - (i64.load offset=8 - (get_local $6) - ) - (i64.const 8) - ) - ) - ) - (i32.store offset=4 - (get_local $8) - (tee_local $7 - (i32.load offset=44 - (get_local $6) - ) - ) - ) - (block $label$7 - (block $label$8 - (br_if $label$8 - (i32.ge_u - (tee_local $4 - (i32.load - (tee_local $1 - (i32.add - (get_local $0) - (i32.const 28) - ) - ) - ) - ) - (i32.load - (i32.add - (get_local $0) - (i32.const 32) - ) - ) - ) - ) - (i64.store offset=8 - (get_local $4) - (get_local $5) - ) - (i32.store offset=16 - (get_local $4) - (get_local $7) - ) - (i32.store offset=24 - (get_local $8) - (i32.const 0) - ) - (i32.store - (get_local $4) - (get_local $6) - ) - (i32.store - (get_local $1) - (i32.add - (get_local $4) - (i32.const 24) - ) - ) - (br $label$7) - ) - (call $_ZNSt3__16vectorIN5eosio11multi_indexILy14289235522390851584ENS1_5token12currencystatEJEE8item_ptrENS_9allocatorIS6_EEE24__emplace_back_slow_pathIJNS_10unique_ptrINS5_4itemENS_14default_deleteISC_EEEERyRlEEEvDpOT_ - (i32.add - (get_local $0) - (i32.const 24) - ) - (i32.add - (get_local $8) - (i32.const 24) - ) - (i32.add - (get_local $8) - (i32.const 32) - ) - (i32.add - (get_local $8) - (i32.const 4) - ) - ) - ) - (set_local $4 - (i32.load offset=24 - (get_local $8) - ) - ) - (i32.store offset=24 - (get_local $8) - (i32.const 0) - ) - (br_if $label$2 - (i32.eqz - (get_local $4) - ) - ) - (call $_ZdlPv - (get_local $4) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $8) - (i32.const 48) - ) - ) - (get_local $6) - ) - (func $_ZN5eosio5token12currencystatC2Ev (param $0 i32) (result i32) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (i64.store offset=8 - (get_local $0) - (i64.const 1398362884) - ) - (i64.store - (get_local $0) - (i64.const 0) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 288) - ) - (set_local $1 - (i64.shr_u - (i64.load offset=8 - (get_local $0) - ) - (i64.const 8) - ) - ) - (set_local $2 - (i32.const 0) - ) - (block $label$0 - (block $label$1 - (loop $label$2 - (br_if $label$1 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $1) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$3 - (br_if $label$3 - (i64.ne - (i64.and - (tee_local $1 - (i64.shr_u - (get_local $1) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$4 - (br_if $label$1 - (i64.ne - (i64.and - (tee_local $1 - (i64.shr_u - (get_local $1) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$4 - (i32.lt_s - (tee_local $2 - (i32.add - (get_local $2) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $3 - (i32.const 1) - ) - (br_if $label$2 - (i32.lt_s - (tee_local $2 - (i32.add - (get_local $2) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$0) - ) - ) - (set_local $3 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $3) - (i32.const 16) - ) - (i64.store - (tee_local $2 - (i32.add - (get_local $0) - (i32.const 24) - ) - ) - (i64.const 1398362884) - ) - (i64.store offset=16 - (get_local $0) - (i64.const 0) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 288) - ) - (set_local $1 - (i64.shr_u - (i64.load - (get_local $2) - ) - (i64.const 8) - ) - ) - (set_local $2 - (i32.const 0) - ) - (block $label$5 - (block $label$6 - (loop $label$7 - (br_if $label$6 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $1) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$8 - (br_if $label$8 - (i64.ne - (i64.and - (tee_local $1 - (i64.shr_u - (get_local $1) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$9 - (br_if $label$6 - (i64.ne - (i64.and - (tee_local $1 - (i64.shr_u - (get_local $1) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$9 - (i32.lt_s - (tee_local $2 - (i32.add - (get_local $2) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $3 - (i32.const 1) - ) - (br_if $label$7 - (i32.lt_s - (tee_local $2 - (i32.add - (get_local $2) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$5) - ) - ) - (set_local $3 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $3) - (i32.const 16) - ) - (get_local $0) - ) - (func $_ZN5boost3pfr6detail19for_each_field_implINS1_14sequence_tuple5tupleIJRKN5eosio5assetES8_RKyEEEZNS5_lsINS5_10datastreamIPcEENS5_5token12currencystatELPv0EEERT_SK_RKT0_EUlRKSJ_E_JLj0ELj1ELj2EEEEvSK_OSL_NSt3__116integer_sequenceIjJXspT1_EEEENSS_17integral_constantIbLb0EEE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (set_local $3 - (i32.load - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load offset=8 - (tee_local $2 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $2) - ) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load offset=4 - (get_local $2) - ) - (get_local $3) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $2) - (tee_local $4 - (i32.add - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load offset=8 - (get_local $2) - ) - (get_local $4) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load offset=4 - (get_local $2) - ) - (i32.add - (get_local $3) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $2) - (i32.add - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - (set_local $3 - (i32.load offset=4 - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load offset=8 - (tee_local $2 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $2) - ) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load offset=4 - (get_local $2) - ) - (get_local $3) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $2) - (tee_local $4 - (i32.add - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load offset=8 - (get_local $2) - ) - (get_local $4) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load offset=4 - (get_local $2) - ) - (i32.add - (get_local $3) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $2) - (i32.add - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - (set_local $0 - (i32.load offset=8 - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load offset=8 - (tee_local $2 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $2) - ) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load offset=4 - (get_local $2) - ) - (get_local $0) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $2) - (i32.add - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - ) - (func $_ZNSt3__16vectorIN5eosio11multi_indexILy14289235522390851584ENS1_5token12currencystatEJEE8item_ptrENS_9allocatorIS6_EEE24__emplace_back_slow_pathIJNS_10unique_ptrINS5_4itemENS_14default_deleteISC_EEEERyRlEEEvDpOT_ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (block $label$0 - (block $label$1 - (br_if $label$1 - (i32.ge_u - (tee_local $5 - (i32.add - (tee_local $4 - (i32.div_s - (i32.sub - (i32.load offset=4 - (get_local $0) - ) - (tee_local $6 - (i32.load - (get_local $0) - ) - ) - ) - (i32.const 24) - ) - ) - (i32.const 1) - ) - ) - (i32.const 178956971) - ) - ) - (set_local $7 - (i32.const 178956970) - ) - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.gt_u - (tee_local $6 - (i32.div_s - (i32.sub - (i32.load offset=8 - (get_local $0) - ) - (get_local $6) - ) - (i32.const 24) - ) - ) - (i32.const 89478484) - ) - ) - (br_if $label$2 - (i32.eqz - (tee_local $7 - (select - (get_local $5) - (tee_local $7 - (i32.shl - (get_local $6) - (i32.const 1) - ) - ) - (i32.lt_u - (get_local $7) - (get_local $5) - ) - ) - ) - ) - ) - ) - (set_local $6 - (call $_Znwj - (i32.mul - (get_local $7) - (i32.const 24) - ) - ) - ) - (br $label$0) - ) - (set_local $7 - (i32.const 0) - ) - (set_local $6 - (i32.const 0) - ) - (br $label$0) - ) - (call $_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv - (get_local $0) - ) - (unreachable) - ) - (set_local $5 - (i32.load - (get_local $1) - ) - ) - (i32.store - (get_local $1) - (i32.const 0) - ) - (i32.store - (tee_local $1 - (i32.add - (get_local $6) - (i32.mul - (get_local $4) - (i32.const 24) - ) - ) - ) - (get_local $5) - ) - (i64.store offset=8 - (get_local $1) - (i64.load - (get_local $2) - ) - ) - (i32.store offset=16 - (get_local $1) - (i32.load - (get_local $3) - ) - ) - (set_local $4 - (i32.add - (get_local $6) - (i32.mul - (get_local $7) - (i32.const 24) - ) - ) - ) - (set_local $5 - (i32.add - (get_local $1) - (i32.const 24) - ) - ) - (block $label$4 - (block $label$5 - (br_if $label$5 - (i32.eq - (tee_local $6 - (i32.load - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (tee_local $7 - (i32.load - (get_local $0) - ) - ) - ) - ) - (loop $label$6 - (set_local $3 - (i32.load - (tee_local $2 - (i32.add - (get_local $6) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $2) - (i32.const 0) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -24) - ) - (get_local $3) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -8) - ) - (i32.load - (i32.add - (get_local $6) - (i32.const -8) - ) - ) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -12) - ) - (i32.load - (i32.add - (get_local $6) - (i32.const -12) - ) - ) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -16) - ) - (i32.load - (i32.add - (get_local $6) - (i32.const -16) - ) - ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const -24) - ) - ) - (set_local $6 - (get_local $2) - ) - (br_if $label$6 - (i32.ne - (get_local $7) - (get_local $2) - ) - ) - ) - (set_local $7 - (i32.load - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (set_local $6 - (i32.load - (get_local $0) - ) - ) - (br $label$4) - ) - (set_local $6 - (get_local $7) - ) - ) - (i32.store - (get_local $0) - (get_local $1) - ) - (i32.store - (i32.add - (get_local $0) - (i32.const 4) - ) - (get_local $5) - ) - (i32.store - (i32.add - (get_local $0) - (i32.const 8) - ) - (get_local $4) - ) - (block $label$7 - (br_if $label$7 - (i32.eq - (get_local $7) - (get_local $6) - ) - ) - (loop $label$8 - (set_local $1 - (i32.load - (tee_local $7 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $7) - (i32.const 0) - ) - (block $label$9 - (br_if $label$9 - (i32.eqz - (get_local $1) - ) - ) - (call $_ZdlPv - (get_local $1) - ) - ) - (br_if $label$8 - (i32.ne - (get_local $6) - (get_local $7) - ) - ) - ) - ) - (block $label$10 - (br_if $label$10 - (i32.eqz - (get_local $6) - ) - ) - (call $_ZdlPv - (get_local $6) - ) - ) - ) - (func $_ZN5boost3pfr6detail19for_each_field_implINS1_14sequence_tuple5tupleIJRN5eosio5assetES7_RyEEEZNS5_rsINS5_10datastreamIPKcEENS5_5token12currencystatELPv0EEERT_SJ_RT0_EUlSJ_E_JLj0ELj1ELj2EEEEvSJ_OSK_NSt3__116integer_sequenceIjJXspT1_EEEENSO_17integral_constantIbLb0EEE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (set_local $3 - (i32.load - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (tee_local $2 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $2) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $3) - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $2) - (tee_local $4 - (i32.add - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (get_local $2) - ) - (get_local $4) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $3) - (i32.const 8) - ) - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $2) - (i32.add - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - (set_local $3 - (i32.load offset=4 - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (tee_local $2 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $2) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $3) - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $2) - (tee_local $4 - (i32.add - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (get_local $2) - ) - (get_local $4) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $3) - (i32.const 8) - ) - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $2) - (i32.add - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - (set_local $0 - (i32.load offset=8 - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (tee_local $2 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $2) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $0) - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $2) - (i32.add - (i32.load offset=4 - (get_local $2) - ) - (i32.const 8) - ) - ) - ) - (func $_ZN5eosio5token7approveEyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE (type $FUNCSIG$vijjii) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i32) - (local $8 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $8 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 80) - ) - ) - ) - (call $require_auth - (get_local $1) - ) - (i32.store - (i32.add - (get_local $8) - (i32.const 72) - ) - (i32.const 0) - ) - (i64.store offset=48 - (get_local $8) - (get_local $1) - ) - (i64.store offset=56 - (get_local $8) - (i64.const -1) - ) - (i64.store offset=64 - (get_local $8) - (i64.const 0) - ) - (i64.store offset=40 - (get_local $8) - (i64.load - (get_local $0) - ) - ) - (call $eosio_assert - (i64.ge_s - (i64.load - (call $_ZNK5eosio11multi_indexILy3607749779137757184ENS_5token7accountEJEE3getEyPKc - (i32.add - (get_local $8) - (i32.const 40) - ) - (i64.shr_u - (i64.load offset=8 - (get_local $3) - ) - (i64.const 8) - ) - (i32.const 400) - ) - ) - (i64.load - (get_local $3) - ) - ) - (i32.const 432) - ) - (i64.store - (tee_local $5 - (i32.add - (i32.add - (get_local $8) - (i32.const 24) - ) - (i32.const 8) - ) - ) - (i64.load offset=8 - (get_local $3) - ) - ) - (set_local $6 - (i64.load - (get_local $3) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $8) - (i32.const 8) - ) - (i32.const 12) - ) - (i32.load - (i32.add - (i32.add - (get_local $8) - (i32.const 24) - ) - (i32.const 12) - ) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $8) - (i32.const 8) - ) - (i32.const 8) - ) - (i32.load - (get_local $5) - ) - ) - (i64.store offset=24 - (get_local $8) - (get_local $6) - ) - (i32.store offset=12 - (get_local $8) - (i32.load offset=28 - (get_local $8) - ) - ) - (i32.store offset=8 - (get_local $8) - (i32.load offset=24 - (get_local $8) - ) - ) - (call $_ZN5eosio5token13set_allowanceEyyNS_5assetEb - (get_local $0) - (get_local $1) - (get_local $2) - (i32.add - (get_local $8) - (i32.const 8) - ) - (i32.const 1) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (tee_local $5 - (i32.load offset=64 - (get_local $8) - ) - ) - ) - ) - (block $label$1 - (block $label$2 - (br_if $label$2 - (i32.eq - (tee_local $3 - (i32.load - (tee_local $7 - (i32.add - (get_local $8) - (i32.const 68) - ) - ) - ) - ) - (get_local $5) - ) - ) - (loop $label$3 - (set_local $0 - (i32.load - (tee_local $3 - (i32.add - (get_local $3) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $3) - (i32.const 0) - ) - (block $label$4 - (br_if $label$4 - (i32.eqz - (get_local $0) - ) - ) - (call $_ZdlPv - (get_local $0) - ) - ) - (br_if $label$3 - (i32.ne - (get_local $5) - (get_local $3) - ) - ) - ) - (set_local $3 - (i32.load - (i32.add - (get_local $8) - (i32.const 64) - ) - ) - ) - (br $label$1) - ) - (set_local $3 - (get_local $5) - ) - ) - (i32.store - (get_local $7) - (get_local $5) - ) - (call $_ZdlPv - (get_local $3) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $8) - (i32.const 80) - ) - ) - ) - (func $_ZNK5eosio11multi_indexILy3607749779137757184ENS_5token7accountEJEE3getEyPKc (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (block $label$0 - (br_if $label$0 - (i32.eq - (tee_local $7 - (i32.load - (i32.add - (get_local $0) - (i32.const 28) - ) - ) - ) - (tee_local $3 - (i32.load offset=24 - (get_local $0) - ) - ) - ) - ) - (set_local $6 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - (set_local $4 - (i32.sub - (i32.const 0) - (get_local $3) - ) - ) - (loop $label$1 - (br_if $label$0 - (i64.eq - (i64.shr_u - (i64.load offset=8 - (i32.load - (get_local $6) - ) - ) - (i64.const 8) - ) - (get_local $1) - ) - ) - (set_local $7 - (get_local $6) - ) - (set_local $6 - (tee_local $5 - (i32.add - (get_local $6) - (i32.const -24) - ) - ) - ) - (br_if $label$1 - (i32.ne - (i32.add - (get_local $5) - (get_local $4) - ) - (i32.const -24) - ) - ) - ) - ) - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.eq - (get_local $7) - (get_local $3) - ) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=16 - (tee_local $6 - (i32.load - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - ) - ) - (get_local $0) - ) - (i32.const 96) - ) - (br $label$2) - ) - (set_local $6 - (i32.const 0) - ) - (br_if $label$2 - (i32.lt_s - (tee_local $5 - (call $db_find_i64 - (i64.load - (get_local $0) - ) - (i64.load offset=8 - (get_local $0) - ) - (i64.const 3607749779137757184) - (get_local $1) - ) - ) - (i32.const 0) - ) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=16 - (tee_local $6 - (call $_ZNK5eosio11multi_indexILy3607749779137757184ENS_5token7accountEJEE31load_object_by_primary_iteratorEl - (get_local $0) - (get_local $5) - ) - ) - ) - (get_local $0) - ) - (i32.const 96) - ) - ) - (call $eosio_assert - (i32.ne - (get_local $6) - (i32.const 0) - ) - (get_local $2) - ) - (get_local $6) - ) - (func $_ZN5eosio5token13set_allowanceEyyNS_5assetEb (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i32) - (local $5 i64) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i64) - (local $10 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $10 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 112) - ) - ) - ) - (i64.store offset=104 - (get_local $10) - (get_local $2) - ) - (i32.store8 offset=103 - (get_local $10) - (get_local $4) - ) - (set_local $5 - (i64.load offset=8 - (get_local $3) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $10) - (i32.const 56) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (i64.store offset=64 - (get_local $10) - (tee_local $9 - (i64.shr_u - (get_local $5) - (i64.const 8) - ) - ) - ) - (i64.store offset=72 - (get_local $10) - (i64.const -1) - ) - (i64.store offset=80 - (get_local $10) - (i64.const 0) - ) - (i64.store offset=56 - (get_local $10) - (i64.load - (get_local $0) - ) - ) - (set_local $6 - (call $_ZNK5eosio11multi_indexILy14289235522390851584ENS_5token12currencystatEJEE3getEyPKc - (i32.add - (get_local $10) - (i32.const 56) - ) - (get_local $9) - (i32.const 512) - ) - ) - (set_local $8 - (i32.const 0) - ) - (block $label$0 - (br_if $label$0 - (i64.gt_u - (i64.add - (tee_local $7 - (i64.load - (get_local $3) - ) - ) - (i64.const 4611686018427387903) - ) - (i64.const 9223372036854775806) - ) - ) - (set_local $4 - (i32.const 0) - ) - (block $label$1 - (loop $label$2 - (br_if $label$1 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $9) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$3 - (br_if $label$3 - (i64.ne - (i64.and - (tee_local $9 - (i64.shr_u - (get_local $9) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$4 - (br_if $label$1 - (i64.ne - (i64.and - (tee_local $9 - (i64.shr_u - (get_local $9) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$4 - (i32.lt_s - (tee_local $4 - (i32.add - (get_local $4) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $8 - (i32.const 1) - ) - (br_if $label$2 - (i32.lt_s - (tee_local $4 - (i32.add - (get_local $4) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$0) - ) - ) - (set_local $8 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $8) - (i32.const 544) - ) - (call $eosio_assert - (i32.xor - (i32.wrap/i64 - (i64.shr_u - (get_local $7) - (i64.const 63) - ) - ) - (i32.const 1) - ) - (i32.const 576) - ) - (call $eosio_assert - (i64.eq - (get_local $5) - (i64.load offset=8 - (get_local $6) - ) - ) - (i32.const 608) - ) - (i32.store - (i32.add - (i32.add - (get_local $10) - (i32.const 16) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (i64.store offset=32 - (get_local $10) - (i64.const -1) - ) - (i64.store offset=40 - (get_local $10) - (i64.const 0) - ) - (i64.store offset=16 - (get_local $10) - (tee_local $9 - (i64.load - (get_local $0) - ) - ) - ) - (i64.store offset=24 - (get_local $10) - (get_local $1) - ) - (block $label$5 - (block $label$6 - (block $label$7 - (br_if $label$7 - (i32.lt_s - (tee_local $4 - (call $db_find_i64 - (get_local $9) - (get_local $1) - (i64.const 3774946787993190400) - (get_local $2) - ) - ) - (i32.const 0) - ) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=24 - (tee_local $4 - (call $_ZNK5eosio11multi_indexILy3774946787993190400ENS_5token9allowanceEJEE31load_object_by_primary_iteratorEl - (i32.add - (get_local $10) - (i32.const 16) - ) - (get_local $4) - ) - ) - ) - (i32.add - (get_local $10) - (i32.const 16) - ) - ) - (i32.const 96) - ) - (i32.store offset=12 - (get_local $10) - (get_local $3) - ) - (i32.store offset=8 - (get_local $10) - (i32.add - (get_local $10) - (i32.const 103) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 640) - ) - (call $_ZN5eosio11multi_indexILy3774946787993190400ENS_5token9allowanceEJEE6modifyIZNS1_13set_allowanceEyyNS_5assetEbEUlRT_E0_EEvRKS2_yOS6_ - (i32.add - (get_local $10) - (i32.const 16) - ) - (get_local $4) - (i64.const 0) - (i32.add - (get_local $10) - (i32.const 8) - ) - ) - (br_if $label$6 - (tee_local $3 - (i32.load offset=40 - (get_local $10) - ) - ) - ) - (br $label$5) - ) - (i32.store offset=12 - (get_local $10) - (get_local $3) - ) - (i32.store offset=8 - (get_local $10) - (i32.add - (get_local $10) - (i32.const 104) - ) - ) - (call $_ZN5eosio11multi_indexILy3774946787993190400ENS_5token9allowanceEJEE7emplaceIZNS1_13set_allowanceEyyNS_5assetEbEUlRT_E_EENS3_14const_iteratorEyOS6_ - (get_local $10) - (i32.add - (get_local $10) - (i32.const 16) - ) - (get_local $1) - (i32.add - (get_local $10) - (i32.const 8) - ) - ) - (br_if $label$5 - (i32.eqz - (tee_local $3 - (i32.load offset=40 - (get_local $10) - ) - ) - ) - ) - ) - (block $label$8 - (block $label$9 - (br_if $label$9 - (i32.eq - (tee_local $4 - (i32.load - (tee_local $0 - (i32.add - (get_local $10) - (i32.const 44) - ) - ) - ) - ) - (get_local $3) - ) - ) - (loop $label$10 - (set_local $8 - (i32.load - (tee_local $4 - (i32.add - (get_local $4) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $4) - (i32.const 0) - ) - (block $label$11 - (br_if $label$11 - (i32.eqz - (get_local $8) - ) - ) - (call $_ZdlPv - (get_local $8) - ) - ) - (br_if $label$10 - (i32.ne - (get_local $3) - (get_local $4) - ) - ) - ) - (set_local $4 - (i32.load - (i32.add - (get_local $10) - (i32.const 40) - ) - ) - ) - (br $label$8) - ) - (set_local $4 - (get_local $3) - ) - ) - (i32.store - (get_local $0) - (get_local $3) - ) - (call $_ZdlPv - (get_local $4) - ) - ) - (block $label$12 - (br_if $label$12 - (i32.eqz - (tee_local $3 - (i32.load offset=80 - (get_local $10) - ) - ) - ) - ) - (block $label$13 - (block $label$14 - (br_if $label$14 - (i32.eq - (tee_local $4 - (i32.load - (tee_local $0 - (i32.add - (get_local $10) - (i32.const 84) - ) - ) - ) - ) - (get_local $3) - ) - ) - (loop $label$15 - (set_local $8 - (i32.load - (tee_local $4 - (i32.add - (get_local $4) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $4) - (i32.const 0) - ) - (block $label$16 - (br_if $label$16 - (i32.eqz - (get_local $8) - ) - ) - (call $_ZdlPv - (get_local $8) - ) - ) - (br_if $label$15 - (i32.ne - (get_local $3) - (get_local $4) - ) - ) - ) - (set_local $4 - (i32.load - (i32.add - (get_local $10) - (i32.const 80) - ) - ) - ) - (br $label$13) - ) - (set_local $4 - (get_local $3) - ) - ) - (i32.store - (get_local $0) - (get_local $3) - ) - (call $_ZdlPv - (get_local $4) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $10) - (i32.const 112) - ) - ) - ) - (func $_ZNK5eosio11multi_indexILy14289235522390851584ENS_5token12currencystatEJEE3getEyPKc (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (block $label$0 - (br_if $label$0 - (i32.eq - (tee_local $7 - (i32.load - (i32.add - (get_local $0) - (i32.const 28) - ) - ) - ) - (tee_local $3 - (i32.load offset=24 - (get_local $0) - ) - ) - ) - ) - (set_local $6 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - (set_local $4 - (i32.sub - (i32.const 0) - (get_local $3) - ) - ) - (loop $label$1 - (br_if $label$0 - (i64.eq - (i64.shr_u - (i64.load offset=8 - (i32.load - (get_local $6) - ) - ) - (i64.const 8) - ) - (get_local $1) - ) - ) - (set_local $7 - (get_local $6) - ) - (set_local $6 - (tee_local $5 - (i32.add - (get_local $6) - (i32.const -24) - ) - ) - ) - (br_if $label$1 - (i32.ne - (i32.add - (get_local $5) - (get_local $4) - ) - (i32.const -24) - ) - ) - ) - ) - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.eq - (get_local $7) - (get_local $3) - ) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=40 - (tee_local $6 - (i32.load - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - ) - ) - (get_local $0) - ) - (i32.const 96) - ) - (br $label$2) - ) - (set_local $6 - (i32.const 0) - ) - (br_if $label$2 - (i32.lt_s - (tee_local $5 - (call $db_find_i64 - (i64.load - (get_local $0) - ) - (i64.load offset=8 - (get_local $0) - ) - (i64.const -4157508551318700032) - (get_local $1) - ) - ) - (i32.const 0) - ) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=40 - (tee_local $6 - (call $_ZNK5eosio11multi_indexILy14289235522390851584ENS_5token12currencystatEJEE31load_object_by_primary_iteratorEl - (get_local $0) - (get_local $5) - ) - ) - ) - (get_local $0) - ) - (i32.const 96) - ) - ) - (call $eosio_assert - (i32.ne - (get_local $6) - (i32.const 0) - ) - (get_local $2) - ) - (get_local $6) - ) - (func $_ZNK5eosio11multi_indexILy3774946787993190400ENS_5token9allowanceEJEE31load_object_by_primary_iteratorEl (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - (local $11 i32) - (set_local $10 - (tee_local $11 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 32) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (get_local $11) - ) - (block $label$0 - (br_if $label$0 - (i32.eq - (tee_local $8 - (i32.load - (i32.add - (get_local $0) - (i32.const 28) - ) - ) - ) - (tee_local $3 - (i32.load offset=24 - (get_local $0) - ) - ) - ) - ) - (set_local $4 - (i32.sub - (i32.const 0) - (get_local $3) - ) - ) - (set_local $7 - (i32.add - (get_local $8) - (i32.const -24) - ) - ) - (loop $label$1 - (br_if $label$0 - (i32.eq - (i32.load - (i32.add - (get_local $7) - (i32.const 16) - ) - ) - (get_local $1) - ) - ) - (set_local $8 - (get_local $7) - ) - (set_local $7 - (tee_local $5 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - ) - (br_if $label$1 - (i32.ne - (i32.add - (get_local $5) - (get_local $4) - ) - (i32.const -24) - ) - ) - ) - ) - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.eq - (get_local $8) - (get_local $3) - ) - ) - (set_local $5 - (i32.load - (i32.add - (get_local $8) - (i32.const -24) - ) - ) - ) - (br $label$2) - ) - (call $eosio_assert - (i32.xor - (i32.shr_u - (tee_local $8 - (call $db_get_i64 - (get_local $1) - (i32.const 0) - (i32.const 0) - ) - ) - (i32.const 31) - ) - (i32.const 1) - ) - (i32.const 352) - ) - (block $label$4 - (block $label$5 - (br_if $label$5 - (i32.le_u - (get_local $8) - (i32.const 512) - ) - ) - (drop - (call $db_get_i64 - (get_local $1) - (tee_local $3 - (call $malloc - (get_local $8) - ) - ) - (get_local $8) - ) - ) - (call $free - (get_local $3) - ) - (br $label$4) - ) - (i32.store offset=4 - (i32.const 0) - (tee_local $3 - (i32.sub - (get_local $11) - (i32.and - (i32.add - (get_local $8) - (i32.const 15) - ) - (i32.const -16) - ) - ) - ) - ) - (drop - (call $db_get_i64 - (get_local $1) - (get_local $3) - (get_local $8) - ) - ) - ) - (set_local $2 - (i32.add - (get_local $0) - (i32.const 24) - ) - ) - (i64.store offset=16 - (tee_local $5 - (call $_Znwj - (i32.const 40) - ) - ) - (i64.const 1398362884) - ) - (i64.store offset=8 - (get_local $5) - (i64.const 0) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 288) - ) - (set_local $11 - (i32.add - (get_local $5) - (i32.const 16) - ) - ) - (set_local $6 - (i32.add - (get_local $5) - (i32.const 8) - ) - ) - (set_local $9 - (i64.const 5462355) - ) - (set_local $7 - (i32.const 0) - ) - (block $label$6 - (block $label$7 - (loop $label$8 - (br_if $label$7 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $9) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$9 - (br_if $label$9 - (i64.ne - (i64.and - (tee_local $9 - (i64.shr_u - (get_local $9) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$10 - (br_if $label$7 - (i64.ne - (i64.and - (tee_local $9 - (i64.shr_u - (get_local $9) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$10 - (i32.lt_s - (tee_local $7 - (i32.add - (get_local $7) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $4 - (i32.const 1) - ) - (br_if $label$8 - (i32.lt_s - (tee_local $7 - (i32.add - (get_local $7) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$6) - ) - ) - (set_local $4 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $4) - (i32.const 16) - ) - (i32.store offset=24 - (get_local $5) - (get_local $0) - ) - (call $eosio_assert - (i32.gt_u - (get_local $8) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $5) - (get_local $3) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.ne - (tee_local $7 - (i32.and - (get_local $8) - (i32.const -8) - ) - ) - (i32.const 8) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $6) - (i32.add - (get_local $3) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.ne - (get_local $7) - (i32.const 16) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $11) - (i32.add - (get_local $3) - (i32.const 16) - ) - (i32.const 8) - ) - ) - (i32.store offset=28 - (get_local $5) - (get_local $1) - ) - (i32.store offset=24 - (get_local $10) - (get_local $5) - ) - (i64.store offset=16 - (get_local $10) - (tee_local $9 - (i64.load - (get_local $5) - ) - ) - ) - (i32.store offset=12 - (get_local $10) - (tee_local $8 - (i32.load offset=28 - (get_local $5) - ) - ) - ) - (block $label$11 - (block $label$12 - (br_if $label$12 - (i32.ge_u - (tee_local $7 - (i32.load - (tee_local $1 - (i32.add - (get_local $0) - (i32.const 28) - ) - ) - ) - ) - (i32.load - (i32.add - (get_local $0) - (i32.const 32) - ) - ) - ) - ) - (i64.store offset=8 - (get_local $7) - (get_local $9) - ) - (i32.store offset=16 - (get_local $7) - (get_local $8) - ) - (i32.store offset=24 - (get_local $10) - (i32.const 0) - ) - (i32.store - (get_local $7) - (get_local $5) - ) - (i32.store - (get_local $1) - (i32.add - (get_local $7) - (i32.const 24) - ) - ) - (br $label$11) - ) - (call $_ZNSt3__16vectorIN5eosio11multi_indexILy3774946787993190400ENS1_5token9allowanceEJEE8item_ptrENS_9allocatorIS6_EEE24__emplace_back_slow_pathIJNS_10unique_ptrINS5_4itemENS_14default_deleteISC_EEEERyRlEEEvDpOT_ - (get_local $2) - (i32.add - (get_local $10) - (i32.const 24) - ) - (i32.add - (get_local $10) - (i32.const 16) - ) - (i32.add - (get_local $10) - (i32.const 12) - ) - ) - ) - (set_local $7 - (i32.load offset=24 - (get_local $10) - ) - ) - (i32.store offset=24 - (get_local $10) - (i32.const 0) - ) - (br_if $label$2 - (i32.eqz - (get_local $7) - ) - ) - (call $_ZdlPv - (get_local $7) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $10) - (i32.const 32) - ) - ) - (get_local $5) - ) - (func $_ZN5eosio11multi_indexILy3774946787993190400ENS_5token9allowanceEJEE6modifyIZNS1_13set_allowanceEyyNS_5assetEbEUlRT_E0_EEvRKS2_yOS6_ (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (set_local $8 - (tee_local $9 - (i32.load offset=4 - (i32.const 0) - ) - ) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=24 - (get_local $1) - ) - (get_local $0) - ) - (i32.const 688) - ) - (call $eosio_assert - (i64.eq - (i64.load - (get_local $0) - ) - (call $current_receiver) - ) - (i32.const 736) - ) - (set_local $6 - (i32.add - (get_local $1) - (i32.const 8) - ) - ) - (set_local $5 - (i32.load offset=4 - (get_local $3) - ) - ) - (set_local $4 - (i64.load - (get_local $1) - ) - ) - (block $label$0 - (block $label$1 - (br_if $label$1 - (i32.eqz - (i32.load8_u - (i32.load - (get_local $3) - ) - ) - ) - ) - (call $eosio_assert - (i64.eq - (i64.load offset=8 - (get_local $5) - ) - (i64.load - (i32.add - (get_local $1) - (i32.const 16) - ) - ) - ) - (i32.const 800) - ) - (i64.store - (get_local $6) - (tee_local $7 - (i64.add - (i64.load - (get_local $6) - ) - (i64.load - (get_local $5) - ) - ) - ) - ) - (call $eosio_assert - (i64.gt_s - (get_local $7) - (i64.const -4611686018427387904) - ) - (i32.const 848) - ) - (call $eosio_assert - (i64.lt_s - (i64.load - (get_local $6) - ) - (i64.const 4611686018427387904) - ) - (i32.const 880) - ) - (set_local $7 - (i64.load - (get_local $1) - ) - ) - (br $label$0) - ) - (i64.store - (get_local $6) - (i64.load - (get_local $5) - ) - ) - (i64.store - (i32.add - (get_local $6) - (i32.const 8) - ) - (i64.load - (i32.add - (get_local $5) - (i32.const 8) - ) - ) - ) - (set_local $7 - (get_local $4) - ) - ) - (call $eosio_assert - (i64.eq - (get_local $4) - (get_local $7) - ) - (i32.const 912) - ) - (i32.store offset=4 - (i32.const 0) - (tee_local $5 - (i32.add - (tee_local $3 - (get_local $9) - ) - (i32.const -32) - ) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (get_local $5) - (get_local $1) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.add - (get_local $3) - (i32.const -24) - ) - (get_local $6) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.add - (get_local $3) - (i32.const -16) - ) - (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.const 8) - ) - ) - (call $db_update_i64 - (i32.load offset=28 - (get_local $1) - ) - (get_local $2) - (get_local $5) - (i32.const 24) - ) - (block $label$2 - (br_if $label$2 - (i64.lt_u - (get_local $4) - (i64.load offset=16 - (get_local $0) - ) - ) - ) - (i64.store - (i32.add - (get_local $0) - (i32.const 16) - ) - (select - (i64.const -2) - (i64.add - (get_local $4) - (i64.const 1) - ) - (i64.gt_u - (get_local $4) - (i64.const -3) - ) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (get_local $8) - ) - ) - (func $_ZN5eosio11multi_indexILy3774946787993190400ENS_5token9allowanceEJEE7emplaceIZNS1_13set_allowanceEyyNS_5assetEbEUlRT_E_EENS3_14const_iteratorEyOS6_ (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $7 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 48) - ) - ) - ) - (i64.store offset=40 - (get_local $7) - (get_local $2) - ) - (call $eosio_assert - (i64.eq - (i64.load - (get_local $1) - ) - (call $current_receiver) - ) - (i32.const 208) - ) - (i32.store offset=20 - (get_local $7) - (get_local $3) - ) - (i32.store offset=16 - (get_local $7) - (get_local $1) - ) - (i32.store offset=24 - (get_local $7) - (i32.add - (get_local $7) - (i32.const 40) - ) - ) - (i64.store offset=16 - (tee_local $4 - (call $_Znwj - (i32.const 40) - ) - ) - (i64.const 1398362884) - ) - (i64.store offset=8 - (get_local $4) - (i64.const 0) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 288) - ) - (set_local $2 - (i64.const 5462355) - ) - (set_local $3 - (i32.const 0) - ) - (block $label$0 - (block $label$1 - (loop $label$2 - (br_if $label$1 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $2) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$3 - (br_if $label$3 - (i64.ne - (i64.and - (tee_local $2 - (i64.shr_u - (get_local $2) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$4 - (br_if $label$1 - (i64.ne - (i64.and - (tee_local $2 - (i64.shr_u - (get_local $2) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$4 - (i32.lt_s - (tee_local $3 - (i32.add - (get_local $3) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $6 - (i32.const 1) - ) - (br_if $label$2 - (i32.lt_s - (tee_local $3 - (i32.add - (get_local $3) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$0) - ) - ) - (set_local $6 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $6) - (i32.const 16) - ) - (i32.store offset=24 - (get_local $4) - (get_local $1) - ) - (call $_ZZN5eosio11multi_indexILy3774946787993190400ENS_5token9allowanceEJEE7emplaceIZNS1_13set_allowanceEyyNS_5assetEbEUlRT_E_EENS3_14const_iteratorEyOS6_ENKUlS7_E_clINS3_4itemEEEDaS7_ - (i32.add - (get_local $7) - (i32.const 16) - ) - (get_local $4) - ) - (i32.store offset=32 - (get_local $7) - (get_local $4) - ) - (i64.store offset=16 - (get_local $7) - (tee_local $2 - (i64.load - (get_local $4) - ) - ) - ) - (i32.store offset=12 - (get_local $7) - (tee_local $6 - (i32.load offset=28 - (get_local $4) - ) - ) - ) - (block $label$5 - (block $label$6 - (br_if $label$6 - (i32.ge_u - (tee_local $3 - (i32.load - (tee_local $5 - (i32.add - (get_local $1) - (i32.const 28) - ) - ) - ) - ) - (i32.load - (i32.add - (get_local $1) - (i32.const 32) - ) - ) - ) - ) - (i64.store offset=8 - (get_local $3) - (get_local $2) - ) - (i32.store offset=16 - (get_local $3) - (get_local $6) - ) - (i32.store offset=32 - (get_local $7) - (i32.const 0) - ) - (i32.store - (get_local $3) - (get_local $4) - ) - (i32.store - (get_local $5) - (i32.add - (get_local $3) - (i32.const 24) - ) - ) - (br $label$5) - ) - (call $_ZNSt3__16vectorIN5eosio11multi_indexILy3774946787993190400ENS1_5token9allowanceEJEE8item_ptrENS_9allocatorIS6_EEE24__emplace_back_slow_pathIJNS_10unique_ptrINS5_4itemENS_14default_deleteISC_EEEERyRlEEEvDpOT_ - (i32.add - (get_local $1) - (i32.const 24) - ) - (i32.add - (get_local $7) - (i32.const 32) - ) - (i32.add - (get_local $7) - (i32.const 16) - ) - (i32.add - (get_local $7) - (i32.const 12) - ) - ) - ) - (i32.store offset=4 - (get_local $0) - (get_local $4) - ) - (i32.store - (get_local $0) - (get_local $1) - ) - (set_local $3 - (i32.load offset=32 - (get_local $7) - ) - ) - (i32.store offset=32 - (get_local $7) - (i32.const 0) - ) - (block $label$7 - (br_if $label$7 - (i32.eqz - (get_local $3) - ) - ) - (call $_ZdlPv - (get_local $3) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $7) - (i32.const 48) - ) - ) - ) - (func $_ZZN5eosio11multi_indexILy3774946787993190400ENS_5token9allowanceEJEE7emplaceIZNS1_13set_allowanceEyyNS_5assetEbEUlRT_E_EENS3_14const_iteratorEyOS6_ENKUlS7_E_clINS3_4itemEEEDaS7_ (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $6 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 32) - ) - ) - ) - (i64.store - (get_local $1) - (i64.load - (i32.load - (tee_local $4 - (i32.load offset=4 - (get_local $0) - ) - ) - ) - ) - ) - (set_local $2 - (i32.load - (get_local $0) - ) - ) - (i64.store offset=8 - (get_local $1) - (i64.load - (tee_local $4 - (i32.load offset=4 - (get_local $4) - ) - ) - ) - ) - (i64.store - (tee_local $5 - (i32.add - (get_local $1) - (i32.const 16) - ) - ) - (i64.load - (i32.add - (get_local $4) - (i32.const 8) - ) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (get_local $6) - (get_local $1) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.or - (get_local $6) - (i32.const 8) - ) - (i32.add - (get_local $1) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.add - (get_local $6) - (i32.const 16) - ) - (get_local $5) - (i32.const 8) - ) - ) - (i32.store offset=28 - (get_local $1) - (call $db_store_i64 - (i64.load offset=8 - (get_local $2) - ) - (i64.const 3774946787993190400) - (i64.load - (i32.load offset=8 - (get_local $0) - ) - ) - (tee_local $3 - (i64.load - (get_local $1) - ) - ) - (get_local $6) - (i32.const 24) - ) - ) - (block $label$0 - (br_if $label$0 - (i64.lt_u - (get_local $3) - (i64.load offset=16 - (get_local $2) - ) - ) - ) - (i64.store - (i32.add - (get_local $2) - (i32.const 16) - ) - (select - (i64.const -2) - (i64.add - (get_local $3) - (i64.const 1) - ) - (i64.gt_u - (get_local $3) - (i64.const -3) - ) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $6) - (i32.const 32) - ) - ) - ) - (func $_ZNSt3__16vectorIN5eosio11multi_indexILy3774946787993190400ENS1_5token9allowanceEJEE8item_ptrENS_9allocatorIS6_EEE24__emplace_back_slow_pathIJNS_10unique_ptrINS5_4itemENS_14default_deleteISC_EEEERyRlEEEvDpOT_ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (block $label$0 - (block $label$1 - (br_if $label$1 - (i32.ge_u - (tee_local $5 - (i32.add - (tee_local $4 - (i32.div_s - (i32.sub - (i32.load offset=4 - (get_local $0) - ) - (tee_local $6 - (i32.load - (get_local $0) - ) - ) - ) - (i32.const 24) - ) - ) - (i32.const 1) - ) - ) - (i32.const 178956971) - ) - ) - (set_local $7 - (i32.const 178956970) - ) - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.gt_u - (tee_local $6 - (i32.div_s - (i32.sub - (i32.load offset=8 - (get_local $0) - ) - (get_local $6) - ) - (i32.const 24) - ) - ) - (i32.const 89478484) - ) - ) - (br_if $label$2 - (i32.eqz - (tee_local $7 - (select - (get_local $5) - (tee_local $7 - (i32.shl - (get_local $6) - (i32.const 1) - ) - ) - (i32.lt_u - (get_local $7) - (get_local $5) - ) - ) - ) - ) - ) - ) - (set_local $6 - (call $_Znwj - (i32.mul - (get_local $7) - (i32.const 24) - ) - ) - ) - (br $label$0) - ) - (set_local $7 - (i32.const 0) - ) - (set_local $6 - (i32.const 0) - ) - (br $label$0) - ) - (call $_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv - (get_local $0) - ) - (unreachable) - ) - (set_local $5 - (i32.load - (get_local $1) - ) - ) - (i32.store - (get_local $1) - (i32.const 0) - ) - (i32.store - (tee_local $1 - (i32.add - (get_local $6) - (i32.mul - (get_local $4) - (i32.const 24) - ) - ) - ) - (get_local $5) - ) - (i64.store offset=8 - (get_local $1) - (i64.load - (get_local $2) - ) - ) - (i32.store offset=16 - (get_local $1) - (i32.load - (get_local $3) - ) - ) - (set_local $4 - (i32.add - (get_local $6) - (i32.mul - (get_local $7) - (i32.const 24) - ) - ) - ) - (set_local $5 - (i32.add - (get_local $1) - (i32.const 24) - ) - ) - (block $label$4 - (block $label$5 - (br_if $label$5 - (i32.eq - (tee_local $6 - (i32.load - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (tee_local $7 - (i32.load - (get_local $0) - ) - ) - ) - ) - (loop $label$6 - (set_local $3 - (i32.load - (tee_local $2 - (i32.add - (get_local $6) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $2) - (i32.const 0) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -24) - ) - (get_local $3) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -8) - ) - (i32.load - (i32.add - (get_local $6) - (i32.const -8) - ) - ) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -12) - ) - (i32.load - (i32.add - (get_local $6) - (i32.const -12) - ) - ) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -16) - ) - (i32.load - (i32.add - (get_local $6) - (i32.const -16) - ) - ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const -24) - ) - ) - (set_local $6 - (get_local $2) - ) - (br_if $label$6 - (i32.ne - (get_local $7) - (get_local $2) - ) - ) - ) - (set_local $7 - (i32.load - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (set_local $6 - (i32.load - (get_local $0) - ) - ) - (br $label$4) - ) - (set_local $6 - (get_local $7) - ) - ) - (i32.store - (get_local $0) - (get_local $1) - ) - (i32.store - (i32.add - (get_local $0) - (i32.const 4) - ) - (get_local $5) - ) - (i32.store - (i32.add - (get_local $0) - (i32.const 8) - ) - (get_local $4) - ) - (block $label$7 - (br_if $label$7 - (i32.eq - (get_local $7) - (get_local $6) - ) - ) - (loop $label$8 - (set_local $1 - (i32.load - (tee_local $7 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $7) - (i32.const 0) - ) - (block $label$9 - (br_if $label$9 - (i32.eqz - (get_local $1) - ) - ) - (call $_ZdlPv - (get_local $1) - ) - ) - (br_if $label$8 - (i32.ne - (get_local $6) - (get_local $7) - ) - ) - ) - ) - (block $label$10 - (br_if $label$10 - (i32.eqz - (get_local $6) - ) - ) - (call $_ZdlPv - (get_local $6) - ) - ) - ) - (func $_ZNK5eosio11multi_indexILy3607749779137757184ENS_5token7accountEJEE31load_object_by_primary_iteratorEl (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) - (local $9 i32) - (local $10 i32) - (set_local $9 - (tee_local $10 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 32) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (get_local $10) - ) - (block $label$0 - (br_if $label$0 - (i32.eq - (tee_local $7 - (i32.load - (i32.add - (get_local $0) - (i32.const 28) - ) - ) - ) - (tee_local $3 - (i32.load offset=24 - (get_local $0) - ) - ) - ) - ) - (set_local $4 - (i32.sub - (i32.const 0) - (get_local $3) - ) - ) - (set_local $6 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - (loop $label$1 - (br_if $label$0 - (i32.eq - (i32.load - (i32.add - (get_local $6) - (i32.const 16) - ) - ) - (get_local $1) - ) - ) - (set_local $7 - (get_local $6) - ) - (set_local $6 - (tee_local $5 - (i32.add - (get_local $6) - (i32.const -24) - ) - ) - ) - (br_if $label$1 - (i32.ne - (i32.add - (get_local $5) - (get_local $4) - ) - (i32.const -24) - ) - ) - ) - ) - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.eq - (get_local $7) - (get_local $3) - ) - ) - (set_local $5 - (i32.load - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - ) - (br $label$2) - ) - (call $eosio_assert - (i32.xor - (i32.shr_u - (tee_local $7 - (call $db_get_i64 - (get_local $1) - (i32.const 0) - (i32.const 0) - ) - ) - (i32.const 31) - ) - (i32.const 1) - ) - (i32.const 352) - ) - (block $label$4 - (block $label$5 - (br_if $label$5 - (i32.le_u - (get_local $7) - (i32.const 512) - ) - ) - (drop - (call $db_get_i64 - (get_local $1) - (tee_local $3 - (call $malloc - (get_local $7) - ) - ) - (get_local $7) - ) - ) - (call $free - (get_local $3) - ) - (br $label$4) - ) - (i32.store offset=4 - (i32.const 0) - (tee_local $3 - (i32.sub - (get_local $10) - (i32.and - (i32.add - (get_local $7) - (i32.const 15) - ) - (i32.const -16) - ) - ) - ) - ) - (drop - (call $db_get_i64 - (get_local $1) - (get_local $3) - (get_local $7) - ) - ) - ) - (set_local $2 - (i32.add - (get_local $0) - (i32.const 24) - ) - ) - (i64.store offset=8 - (tee_local $5 - (call $_Znwj - (i32.const 32) - ) - ) - (i64.const 1398362884) - ) - (i64.store - (get_local $5) - (i64.const 0) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 288) - ) - (set_local $10 - (i32.add - (get_local $5) - (i32.const 8) - ) - ) - (set_local $8 - (i64.const 5462355) - ) - (set_local $6 - (i32.const 0) - ) - (block $label$6 - (block $label$7 - (loop $label$8 - (br_if $label$7 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $8) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$9 - (br_if $label$9 - (i64.ne - (i64.and - (tee_local $8 - (i64.shr_u - (get_local $8) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$10 - (br_if $label$7 - (i64.ne - (i64.and - (tee_local $8 - (i64.shr_u - (get_local $8) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$10 - (i32.lt_s - (tee_local $6 - (i32.add - (get_local $6) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $4 - (i32.const 1) - ) - (br_if $label$8 - (i32.lt_s - (tee_local $6 - (i32.add - (get_local $6) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$6) - ) - ) - (set_local $4 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $4) - (i32.const 16) - ) - (i32.store offset=16 - (get_local $5) - (get_local $0) - ) - (call $eosio_assert - (i32.gt_u - (get_local $7) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $5) - (get_local $3) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.ne - (i32.and - (get_local $7) - (i32.const -8) - ) - (i32.const 8) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $10) - (i32.add - (get_local $3) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (i32.store offset=20 - (get_local $5) - (get_local $1) - ) - (i32.store offset=24 - (get_local $9) - (get_local $5) - ) - (i64.store offset=16 - (get_local $9) - (tee_local $8 - (i64.shr_u - (i64.load - (i32.add - (get_local $5) - (i32.const 8) - ) - ) - (i64.const 8) - ) - ) - ) - (i32.store offset=12 - (get_local $9) - (tee_local $7 - (i32.load offset=20 - (get_local $5) - ) - ) - ) - (block $label$11 - (block $label$12 - (br_if $label$12 - (i32.ge_u - (tee_local $6 - (i32.load - (tee_local $1 - (i32.add - (get_local $0) - (i32.const 28) - ) - ) - ) - ) - (i32.load - (i32.add - (get_local $0) - (i32.const 32) - ) - ) - ) - ) - (i64.store offset=8 - (get_local $6) - (get_local $8) - ) - (i32.store offset=16 - (get_local $6) - (get_local $7) - ) - (i32.store offset=24 - (get_local $9) - (i32.const 0) - ) - (i32.store - (get_local $6) - (get_local $5) - ) - (i32.store - (get_local $1) - (i32.add - (get_local $6) - (i32.const 24) - ) - ) - (br $label$11) - ) - (call $_ZNSt3__16vectorIN5eosio11multi_indexILy3607749779137757184ENS1_5token7accountEJEE8item_ptrENS_9allocatorIS6_EEE24__emplace_back_slow_pathIJNS_10unique_ptrINS5_4itemENS_14default_deleteISC_EEEERyRlEEEvDpOT_ - (get_local $2) - (i32.add - (get_local $9) - (i32.const 24) - ) - (i32.add - (get_local $9) - (i32.const 16) - ) - (i32.add - (get_local $9) - (i32.const 12) - ) - ) - ) - (set_local $6 - (i32.load offset=24 - (get_local $9) - ) - ) - (i32.store offset=24 - (get_local $9) - (i32.const 0) - ) - (br_if $label$2 - (i32.eqz - (get_local $6) - ) - ) - (call $_ZdlPv - (get_local $6) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $9) - (i32.const 32) - ) - ) - (get_local $5) - ) - (func $_ZNSt3__16vectorIN5eosio11multi_indexILy3607749779137757184ENS1_5token7accountEJEE8item_ptrENS_9allocatorIS6_EEE24__emplace_back_slow_pathIJNS_10unique_ptrINS5_4itemENS_14default_deleteISC_EEEERyRlEEEvDpOT_ (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (block $label$0 - (block $label$1 - (br_if $label$1 - (i32.ge_u - (tee_local $5 - (i32.add - (tee_local $4 - (i32.div_s - (i32.sub - (i32.load offset=4 - (get_local $0) - ) - (tee_local $6 - (i32.load - (get_local $0) - ) - ) - ) - (i32.const 24) - ) - ) - (i32.const 1) - ) - ) - (i32.const 178956971) - ) - ) - (set_local $7 - (i32.const 178956970) - ) - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.gt_u - (tee_local $6 - (i32.div_s - (i32.sub - (i32.load offset=8 - (get_local $0) - ) - (get_local $6) - ) - (i32.const 24) - ) - ) - (i32.const 89478484) - ) - ) - (br_if $label$2 - (i32.eqz - (tee_local $7 - (select - (get_local $5) - (tee_local $7 - (i32.shl - (get_local $6) - (i32.const 1) - ) - ) - (i32.lt_u - (get_local $7) - (get_local $5) - ) - ) - ) - ) - ) - ) - (set_local $6 - (call $_Znwj - (i32.mul - (get_local $7) - (i32.const 24) - ) - ) - ) - (br $label$0) - ) - (set_local $7 - (i32.const 0) - ) - (set_local $6 - (i32.const 0) - ) - (br $label$0) - ) - (call $_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv - (get_local $0) - ) - (unreachable) - ) - (set_local $5 - (i32.load - (get_local $1) - ) - ) - (i32.store - (get_local $1) - (i32.const 0) - ) - (i32.store - (tee_local $1 - (i32.add - (get_local $6) - (i32.mul - (get_local $4) - (i32.const 24) - ) - ) - ) - (get_local $5) - ) - (i64.store offset=8 - (get_local $1) - (i64.load - (get_local $2) - ) - ) - (i32.store offset=16 - (get_local $1) - (i32.load - (get_local $3) - ) - ) - (set_local $4 - (i32.add - (get_local $6) - (i32.mul - (get_local $7) - (i32.const 24) - ) - ) - ) - (set_local $5 - (i32.add - (get_local $1) - (i32.const 24) - ) - ) - (block $label$4 - (block $label$5 - (br_if $label$5 - (i32.eq - (tee_local $6 - (i32.load - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (tee_local $7 - (i32.load - (get_local $0) - ) - ) - ) - ) - (loop $label$6 - (set_local $3 - (i32.load - (tee_local $2 - (i32.add - (get_local $6) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $2) - (i32.const 0) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -24) - ) - (get_local $3) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -8) - ) - (i32.load - (i32.add - (get_local $6) - (i32.const -8) - ) - ) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -12) - ) - (i32.load - (i32.add - (get_local $6) - (i32.const -12) - ) - ) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const -16) - ) - (i32.load - (i32.add - (get_local $6) - (i32.const -16) - ) - ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const -24) - ) - ) - (set_local $6 - (get_local $2) - ) - (br_if $label$6 - (i32.ne - (get_local $7) - (get_local $2) - ) - ) - ) - (set_local $7 - (i32.load - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (set_local $6 - (i32.load - (get_local $0) - ) - ) - (br $label$4) - ) - (set_local $6 - (get_local $7) - ) - ) - (i32.store - (get_local $0) - (get_local $1) - ) - (i32.store - (i32.add - (get_local $0) - (i32.const 4) - ) - (get_local $5) - ) - (i32.store - (i32.add - (get_local $0) - (i32.const 8) - ) - (get_local $4) - ) - (block $label$7 - (br_if $label$7 - (i32.eq - (get_local $7) - (get_local $6) - ) - ) - (loop $label$8 - (set_local $1 - (i32.load - (tee_local $7 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $7) - (i32.const 0) - ) - (block $label$9 - (br_if $label$9 - (i32.eqz - (get_local $1) - ) - ) - (call $_ZdlPv - (get_local $1) - ) - ) - (br_if $label$8 - (i32.ne - (get_local $6) - (get_local $7) - ) - ) - ) - ) - (block $label$10 - (br_if $label$10 - (i32.eqz - (get_local $6) - ) - ) - (call $_ZdlPv - (get_local $6) - ) - ) - ) - (func $_ZN5eosio5token5issueEyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE (type $FUNCSIG$vijii) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $14 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 224) - ) - ) - ) - (set_local $9 - (i32.const 0) - ) - (set_local $8 - (tee_local $13 - (i64.shr_u - (tee_local $11 - (i64.load offset=8 - (get_local $2) - ) - ) - (i64.const 8) - ) - ) - ) - (block $label$0 - (block $label$1 - (loop $label$2 - (br_if $label$1 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $8) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$3 - (br_if $label$3 - (i64.ne - (i64.and - (tee_local $8 - (i64.shr_u - (get_local $8) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$4 - (br_if $label$1 - (i64.ne - (i64.and - (tee_local $8 - (i64.shr_u - (get_local $8) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$4 - (i32.lt_s - (tee_local $9 - (i32.add - (get_local $9) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $7 - (i32.const 1) - ) - (br_if $label$2 - (i32.lt_s - (tee_local $9 - (i32.add - (get_local $9) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$0) - ) - ) - (set_local $7 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $7) - (i32.const 16) - ) - (block $label$5 - (block $label$6 - (br_if $label$6 - (i32.and - (tee_local $9 - (i32.load8_u - (get_local $3) - ) - ) - (i32.const 1) - ) - ) - (set_local $9 - (i32.shr_u - (get_local $9) - (i32.const 1) - ) - ) - (br $label$5) - ) - (set_local $9 - (i32.load offset=4 - (get_local $3) - ) - ) - ) - (call $eosio_assert - (i32.lt_u - (get_local $9) - (i32.const 257) - ) - (i32.const 976) - ) - (set_local $10 - (i32.const 0) - ) - (i32.store - (i32.add - (i32.add - (get_local $14) - (i32.const 88) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (i64.store offset=104 - (get_local $14) - (i64.const -1) - ) - (i64.store offset=112 - (get_local $14) - (i64.const 0) - ) - (i64.store offset=88 - (get_local $14) - (tee_local $8 - (i64.load - (get_local $0) - ) - ) - ) - (i64.store offset=96 - (get_local $14) - (get_local $13) - ) - (set_local $7 - (i32.const 0) - ) - (block $label$7 - (br_if $label$7 - (i32.lt_s - (tee_local $9 - (call $db_find_i64 - (get_local $8) - (get_local $13) - (i64.const -4157508551318700032) - (get_local $13) - ) - ) - (i32.const 0) - ) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=40 - (tee_local $7 - (call $_ZNK5eosio11multi_indexILy14289235522390851584ENS_5token12currencystatEJEE31load_object_by_primary_iteratorEl - (i32.add - (get_local $14) - (i32.const 88) - ) - (get_local $9) - ) - ) - ) - (i32.add - (get_local $14) - (i32.const 88) - ) - ) - (i32.const 96) - ) - ) - (call $eosio_assert - (i32.ne - (get_local $7) - (i32.const 0) - ) - (i32.const 1008) - ) - (call $require_auth - (i64.load offset=32 - (get_local $7) - ) - ) - (set_local $4 - (i32.add - (get_local $7) - (i32.const 32) - ) - ) - (block $label$8 - (br_if $label$8 - (i64.gt_u - (i64.add - (tee_local $8 - (i64.load - (get_local $2) - ) - ) - (i64.const 4611686018427387903) - ) - (i64.const 9223372036854775806) - ) - ) - (set_local $9 - (i32.const 0) - ) - (block $label$9 - (loop $label$10 - (br_if $label$9 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $13) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$11 - (br_if $label$11 - (i64.ne - (i64.and - (tee_local $13 - (i64.shr_u - (get_local $13) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$12 - (br_if $label$9 - (i64.ne - (i64.and - (tee_local $13 - (i64.shr_u - (get_local $13) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$12 - (i32.lt_s - (tee_local $9 - (i32.add - (get_local $9) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $10 - (i32.const 1) - ) - (br_if $label$10 - (i32.lt_s - (tee_local $9 - (i32.add - (get_local $9) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$8) - ) - ) - (set_local $10 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $10) - (i32.const 544) - ) - (call $eosio_assert - (i64.gt_s - (get_local $8) - (i64.const 0) - ) - (i32.const 1072) - ) - (call $eosio_assert - (i64.eq - (get_local $11) - (i64.load offset=8 - (get_local $7) - ) - ) - (i32.const 608) - ) - (call $eosio_assert - (i64.le_s - (get_local $8) - (i64.sub - (i64.load offset=16 - (get_local $7) - ) - (i64.load - (get_local $7) - ) - ) - ) - (i32.const 1104) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=40 - (get_local $7) - ) - (i32.add - (get_local $14) - (i32.const 88) - ) - ) - (i32.const 688) - ) - (call $eosio_assert - (i64.eq - (i64.load offset=88 - (get_local $14) - ) - (call $current_receiver) - ) - (i32.const 736) - ) - (call $eosio_assert - (i64.eq - (get_local $11) - (tee_local $13 - (i64.load offset=8 - (get_local $7) - ) - ) - ) - (i32.const 800) - ) - (i64.store - (get_local $7) - (tee_local $8 - (i64.add - (i64.load - (get_local $7) - ) - (get_local $8) - ) - ) - ) - (call $eosio_assert - (i64.gt_s - (get_local $8) - (i64.const -4611686018427387904) - ) - (i32.const 848) - ) - (call $eosio_assert - (i64.lt_s - (i64.load - (get_local $7) - ) - (i64.const 4611686018427387904) - ) - (i32.const 880) - ) - (call $eosio_assert - (i64.eq - (tee_local $8 - (i64.shr_u - (get_local $13) - (i64.const 8) - ) - ) - (i64.shr_u - (i64.load offset=8 - (get_local $7) - ) - (i64.const 8) - ) - ) - (i32.const 912) - ) - (i32.store offset=192 - (get_local $14) - (i32.add - (i32.add - (get_local $14) - (i32.const 128) - ) - (i32.const 40) - ) - ) - (i32.store offset=188 - (get_local $14) - (i32.add - (get_local $14) - (i32.const 128) - ) - ) - (i32.store offset=184 - (get_local $14) - (i32.add - (get_local $14) - (i32.const 128) - ) - ) - (i32.store offset=200 - (get_local $14) - (i32.add - (get_local $14) - (i32.const 184) - ) - ) - (i32.store offset=212 - (get_local $14) - (i32.add - (get_local $7) - (i32.const 16) - ) - ) - (i32.store offset=208 - (get_local $14) - (get_local $7) - ) - (i32.store offset=216 - (get_local $14) - (get_local $4) - ) - (call $_ZN5boost3pfr6detail19for_each_field_implINS1_14sequence_tuple5tupleIJRKN5eosio5assetES8_RKyEEEZNS5_lsINS5_10datastreamIPcEENS5_5token12currencystatELPv0EEERT_SK_RKT0_EUlRKSJ_E_JLj0ELj1ELj2EEEEvSK_OSL_NSt3__116integer_sequenceIjJXspT1_EEEENSS_17integral_constantIbLb0EEE - (i32.add - (get_local $14) - (i32.const 208) - ) - (i32.add - (get_local $14) - (i32.const 200) - ) - ) - (call $db_update_i64 - (i32.load offset=44 - (get_local $7) - ) - (i64.const 0) - (i32.add - (get_local $14) - (i32.const 128) - ) - (i32.const 40) - ) - (block $label$13 - (br_if $label$13 - (i64.lt_u - (get_local $8) - (i64.load - (tee_local $9 - (i32.add - (i32.add - (get_local $14) - (i32.const 88) - ) - (i32.const 16) - ) - ) - ) - ) - ) - (i64.store - (get_local $9) - (i64.add - (get_local $8) - (i64.const 1) - ) - ) - ) - (i32.store - (tee_local $9 - (i32.add - (i32.add - (get_local $14) - (i32.const 72) - ) - (i32.const 12) - ) - ) - (i32.load - (i32.add - (get_local $2) - (i32.const 12) - ) - ) - ) - (i32.store - (tee_local $7 - (i32.add - (i32.add - (get_local $14) - (i32.const 72) - ) - (i32.const 8) - ) - ) - (i32.load - (i32.add - (get_local $2) - (i32.const 8) - ) - ) - ) - (i32.store offset=76 - (get_local $14) - (i32.load - (i32.add - (get_local $2) - (i32.const 4) - ) - ) - ) - (i32.store offset=72 - (get_local $14) - (i32.load - (get_local $2) - ) - ) - (set_local $8 - (i64.load - (get_local $4) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $14) - (i32.const 8) - ) - (i32.const 12) - ) - (i32.load - (get_local $9) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $14) - (i32.const 8) - ) - (i32.const 8) - ) - (i32.load - (get_local $7) - ) - ) - (i32.store offset=12 - (get_local $14) - (i32.load offset=76 - (get_local $14) - ) - ) - (i32.store offset=8 - (get_local $14) - (i32.load offset=72 - (get_local $14) - ) - ) - (call $_ZN5eosio5token11add_balanceEyNS_5assetEy - (get_local $0) - (get_local $8) - (i32.add - (get_local $14) - (i32.const 8) - ) - (get_local $8) - ) - (block $label$14 - (br_if $label$14 - (i64.eq - (tee_local $5 - (i64.load - (get_local $4) - ) - ) - (get_local $1) - ) - ) - (set_local $6 - (i64.load - (get_local $0) - ) - ) - (set_local $8 - (i64.const 0) - ) - (set_local $11 - (i64.const 59) - ) - (set_local $9 - (i32.const 1152) - ) - (set_local $12 - (i64.const 0) - ) - (loop $label$15 - (block $label$16 - (block $label$17 - (block $label$18 - (block $label$19 - (block $label$20 - (br_if $label$20 - (i64.gt_u - (get_local $8) - (i64.const 5) - ) - ) - (br_if $label$19 - (i32.gt_u - (i32.and - (i32.add - (tee_local $7 - (i32.load8_s - (get_local $9) - ) - ) - (i32.const -97) - ) - (i32.const 255) - ) - (i32.const 25) - ) - ) - (set_local $7 - (i32.add - (get_local $7) - (i32.const 165) - ) - ) - (br $label$18) - ) - (set_local $13 - (i64.const 0) - ) - (br_if $label$17 - (i64.le_u - (get_local $8) - (i64.const 11) - ) - ) - (br $label$16) - ) - (set_local $7 - (select - (i32.add - (get_local $7) - (i32.const 208) - ) - (i32.const 0) - (i32.lt_u - (i32.and - (i32.add - (get_local $7) - (i32.const -49) - ) - (i32.const 255) - ) - (i32.const 5) - ) - ) - ) - ) - (set_local $13 - (i64.shr_s - (i64.shl - (i64.extend_u/i32 - (get_local $7) - ) - (i64.const 56) - ) - (i64.const 56) - ) - ) - ) - (set_local $13 - (i64.shl - (i64.and - (get_local $13) - (i64.const 31) - ) - (i64.and - (get_local $11) - (i64.const 4294967295) - ) - ) - ) - ) - (set_local $9 - (i32.add - (get_local $9) - (i32.const 1) - ) - ) - (set_local $8 - (i64.add - (get_local $8) - (i64.const 1) - ) - ) - (set_local $12 - (i64.or - (get_local $13) - (get_local $12) - ) - ) - (br_if $label$15 - (i64.ne - (tee_local $11 - (i64.add - (get_local $11) - (i64.const -5) - ) - ) - (i64.const -6) - ) - ) - ) - (i32.store - (i32.add - (get_local $14) - (i32.const 52) - ) - (i32.load - (i32.add - (get_local $2) - (i32.const 12) - ) - ) - ) - (i32.store - (tee_local $7 - (i32.add - (i32.add - (get_local $14) - (i32.const 24) - ) - (i32.const 24) - ) - ) - (i32.load - (i32.add - (get_local $2) - (i32.const 8) - ) - ) - ) - (i32.store - (i32.add - (get_local $14) - (i32.const 44) - ) - (i32.load - (i32.add - (get_local $2) - (i32.const 4) - ) - ) - ) - (i64.store offset=32 - (get_local $14) - (get_local $1) - ) - (i64.store offset=24 - (get_local $14) - (get_local $5) - ) - (i32.store offset=40 - (get_local $14) - (i32.load - (get_local $2) - ) - ) - (drop - (call $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_ - (i32.add - (get_local $14) - (i32.const 56) - ) - (get_local $3) - ) - ) - (i64.store - (tee_local $9 - (call $_Znwj - (i32.const 16) - ) - ) - (get_local $5) - ) - (i64.store offset=8 - (get_local $9) - (get_local $12) - ) - (i32.store offset=208 - (get_local $14) - (get_local $9) - ) - (i32.store offset=216 - (get_local $14) - (tee_local $9 - (i32.add - (get_local $9) - (i32.const 16) - ) - ) - ) - (i32.store offset=212 - (get_local $14) - (get_local $9) - ) - (i64.store offset=128 - (get_local $14) - (i64.load offset=24 - (get_local $14) - ) - ) - (i64.store offset=136 - (get_local $14) - (i64.load offset=32 - (get_local $14) - ) - ) - (i64.store - (i32.add - (i32.add - (get_local $14) - (i32.const 128) - ) - (i32.const 24) - ) - (i64.load - (get_local $7) - ) - ) - (i64.store offset=144 - (get_local $14) - (i64.load offset=40 - (get_local $14) - ) - ) - (i32.store - (tee_local $7 - (i32.add - (i32.add - (get_local $14) - (i32.const 128) - ) - (i32.const 40) - ) - ) - (i32.load - (tee_local $9 - (i32.add - (i32.add - (get_local $14) - (i32.const 24) - ) - (i32.const 40) - ) - ) - ) - ) - (i64.store offset=160 - (get_local $14) - (i64.load offset=56 - (get_local $14) - ) - ) - (i32.store offset=56 - (get_local $14) - (i32.const 0) - ) - (i32.store - (i32.add - (get_local $14) - (i32.const 60) - ) - (i32.const 0) - ) - (i32.store - (get_local $9) - (i32.const 0) - ) - (call $_ZN5eosio15dispatch_inlineIJyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEEvyyNS2_6vectorINS_16permission_levelENS6_ISA_EEEENS2_5tupleIJDpT_EEE - (get_local $6) - (i64.const -3617168760277827584) - (i32.add - (get_local $14) - (i32.const 208) - ) - (i32.add - (get_local $14) - (i32.const 128) - ) - ) - (block $label$21 - (br_if $label$21 - (i32.eqz - (i32.and - (i32.load8_u offset=160 - (get_local $14) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load - (get_local $7) - ) - ) - ) - (block $label$22 - (br_if $label$22 - (i32.eqz - (tee_local $9 - (i32.load offset=208 - (get_local $14) - ) - ) - ) - ) - (i32.store offset=212 - (get_local $14) - (get_local $9) - ) - (call $_ZdlPv - (get_local $9) - ) - ) - (br_if $label$14 - (i32.eqz - (i32.and - (i32.load8_u - (i32.add - (get_local $14) - (i32.const 56) - ) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load - (i32.add - (get_local $14) - (i32.const 64) - ) - ) - ) - ) - (block $label$23 - (br_if $label$23 - (i32.eqz - (tee_local $2 - (i32.load offset=112 - (get_local $14) - ) - ) - ) - ) - (block $label$24 - (block $label$25 - (br_if $label$25 - (i32.eq - (tee_local $9 - (i32.load - (tee_local $10 - (i32.add - (get_local $14) - (i32.const 116) - ) - ) - ) - ) - (get_local $2) - ) - ) - (loop $label$26 - (set_local $7 - (i32.load - (tee_local $9 - (i32.add - (get_local $9) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $9) - (i32.const 0) - ) - (block $label$27 - (br_if $label$27 - (i32.eqz - (get_local $7) - ) - ) - (call $_ZdlPv - (get_local $7) - ) - ) - (br_if $label$26 - (i32.ne - (get_local $2) - (get_local $9) - ) - ) - ) - (set_local $9 - (i32.load - (i32.add - (get_local $14) - (i32.const 112) - ) - ) - ) - (br $label$24) - ) - (set_local $9 - (get_local $2) - ) - ) - (i32.store - (get_local $10) - (get_local $2) - ) - (call $_ZdlPv - (get_local $9) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $14) - (i32.const 224) - ) - ) - ) - (func $_ZN5eosio5token11add_balanceEyNS_5assetEy (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) - (local $4 i64) - (local $5 i32) - (local $6 i64) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $9 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 80) - ) - ) - ) - (set_local $8 - (i32.const 0) - ) - (i32.store - (i32.add - (i32.add - (get_local $9) - (i32.const 8) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (i64.store offset=24 - (get_local $9) - (i64.const -1) - ) - (i64.store offset=32 - (get_local $9) - (i64.const 0) - ) - (i64.store offset=8 - (get_local $9) - (tee_local $6 - (i64.load - (get_local $0) - ) - ) - ) - (i64.store offset=16 - (get_local $9) - (get_local $1) - ) - (block $label$0 - (block $label$1 - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.lt_s - (tee_local $0 - (call $db_find_i64 - (get_local $6) - (get_local $1) - (i64.const 3607749779137757184) - (i64.shr_u - (tee_local $4 - (i64.load offset=8 - (get_local $2) - ) - ) - (i64.const 8) - ) - ) - ) - (i32.const 0) - ) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=16 - (tee_local $8 - (call $_ZNK5eosio11multi_indexILy3607749779137757184ENS_5token7accountEJEE31load_object_by_primary_iteratorEl - (i32.add - (get_local $9) - (i32.const 8) - ) - (get_local $0) - ) - ) - ) - (i32.add - (get_local $9) - (i32.const 8) - ) - ) - (i32.const 96) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 640) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=16 - (get_local $8) - ) - (i32.add - (get_local $9) - (i32.const 8) - ) - ) - (i32.const 688) - ) - (call $eosio_assert - (i64.eq - (i64.load offset=8 - (get_local $9) - ) - (call $current_receiver) - ) - (i32.const 736) - ) - (call $eosio_assert - (i64.eq - (get_local $4) - (tee_local $1 - (i64.load offset=8 - (get_local $8) - ) - ) - ) - (i32.const 800) - ) - (i64.store - (get_local $8) - (tee_local $6 - (i64.add - (i64.load - (get_local $8) - ) - (i64.load - (get_local $2) - ) - ) - ) - ) - (call $eosio_assert - (i64.gt_s - (get_local $6) - (i64.const -4611686018427387904) - ) - (i32.const 848) - ) - (call $eosio_assert - (i64.lt_s - (i64.load - (get_local $8) - ) - (i64.const 4611686018427387904) - ) - (i32.const 880) - ) - (call $eosio_assert - (i64.eq - (tee_local $1 - (i64.shr_u - (get_local $1) - (i64.const 8) - ) - ) - (i64.shr_u - (i64.load offset=8 - (get_local $8) - ) - (i64.const 8) - ) - ) - (i32.const 912) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.add - (get_local $9) - (i32.const 64) - ) - (get_local $8) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.or - (i32.add - (get_local $9) - (i32.const 64) - ) - (i32.const 8) - ) - (i32.add - (get_local $8) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (call $db_update_i64 - (i32.load offset=20 - (get_local $8) - ) - (i64.const 0) - (i32.add - (get_local $9) - (i32.const 64) - ) - (i32.const 16) - ) - (br_if $label$2 - (i64.lt_u - (get_local $1) - (i64.load - (tee_local $8 - (i32.add - (i32.add - (get_local $9) - (i32.const 8) - ) - (i32.const 16) - ) - ) - ) - ) - ) - (i64.store - (get_local $8) - (i64.add - (get_local $1) - (i64.const 1) - ) - ) - (br_if $label$1 - (tee_local $2 - (i32.load offset=32 - (get_local $9) - ) - ) - ) - (br $label$0) - ) - (call $eosio_assert - (i64.eq - (i64.load offset=8 - (get_local $9) - ) - (call $current_receiver) - ) - (i32.const 208) - ) - (i64.store offset=8 - (tee_local $0 - (call $_Znwj - (i32.const 32) - ) - ) - (i64.const 1398362884) - ) - (i64.store - (get_local $0) - (i64.const 0) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 288) - ) - (set_local $5 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (set_local $1 - (i64.const 5462355) - ) - (block $label$4 - (loop $label$5 - (set_local $7 - (i32.const 0) - ) - (br_if $label$4 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $1) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$6 - (br_if $label$6 - (i64.ne - (i64.and - (tee_local $1 - (i64.shr_u - (get_local $1) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$7 - (br_if $label$4 - (i64.ne - (i64.and - (tee_local $1 - (i64.shr_u - (get_local $1) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$7 - (i32.lt_s - (tee_local $8 - (i32.add - (get_local $8) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $7 - (i32.const 1) - ) - (br_if $label$5 - (i32.lt_s - (tee_local $8 - (i32.add - (get_local $8) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (call $eosio_assert - (get_local $7) - (i32.const 16) - ) - (i32.store offset=16 - (get_local $0) - (i32.add - (get_local $9) - (i32.const 8) - ) - ) - (i64.store - (tee_local $8 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (i64.load - (i32.add - (get_local $2) - (i32.const 8) - ) - ) - ) - (i64.store - (get_local $0) - (i64.load - (get_local $2) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.add - (get_local $9) - (i32.const 64) - ) - (get_local $0) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.or - (i32.add - (get_local $9) - (i32.const 64) - ) - (i32.const 8) - ) - (get_local $5) - (i32.const 8) - ) - ) - (i32.store offset=20 - (get_local $0) - (tee_local $2 - (call $db_store_i64 - (i64.load - (i32.add - (i32.add - (get_local $9) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (i64.const 3607749779137757184) - (get_local $3) - (tee_local $1 - (i64.shr_u - (i64.load - (get_local $8) - ) - (i64.const 8) - ) - ) - (i32.add - (get_local $9) - (i32.const 64) - ) - (i32.const 16) - ) - ) - ) - (block $label$8 - (br_if $label$8 - (i64.lt_u - (get_local $1) - (i64.load - (tee_local $7 - (i32.add - (i32.add - (get_local $9) - (i32.const 8) - ) - (i32.const 16) - ) - ) - ) - ) - ) - (i64.store - (get_local $7) - (i64.add - (get_local $1) - (i64.const 1) - ) - ) - ) - (i32.store offset=56 - (get_local $9) - (get_local $0) - ) - (i64.store offset=64 - (get_local $9) - (tee_local $1 - (i64.shr_u - (i64.load - (get_local $8) - ) - (i64.const 8) - ) - ) - ) - (i32.store offset=52 - (get_local $9) - (get_local $2) - ) - (block $label$9 - (block $label$10 - (br_if $label$10 - (i32.ge_u - (tee_local $8 - (i32.load - (tee_local $7 - (i32.add - (get_local $9) - (i32.const 36) - ) - ) - ) - ) - (i32.load - (i32.add - (get_local $9) - (i32.const 40) - ) - ) - ) - ) - (i64.store offset=8 - (get_local $8) - (get_local $1) - ) - (i32.store offset=16 - (get_local $8) - (get_local $2) - ) - (i32.store offset=56 - (get_local $9) - (i32.const 0) - ) - (i32.store - (get_local $8) - (get_local $0) - ) - (i32.store - (get_local $7) - (i32.add - (get_local $8) - (i32.const 24) - ) - ) - (br $label$9) - ) - (call $_ZNSt3__16vectorIN5eosio11multi_indexILy3607749779137757184ENS1_5token7accountEJEE8item_ptrENS_9allocatorIS6_EEE24__emplace_back_slow_pathIJNS_10unique_ptrINS5_4itemENS_14default_deleteISC_EEEERyRlEEEvDpOT_ - (i32.add - (get_local $9) - (i32.const 32) - ) - (i32.add - (get_local $9) - (i32.const 56) - ) - (i32.add - (get_local $9) - (i32.const 64) - ) - (i32.add - (get_local $9) - (i32.const 52) - ) - ) - ) - (set_local $8 - (i32.load offset=56 - (get_local $9) - ) - ) - (i32.store offset=56 - (get_local $9) - (i32.const 0) - ) - (br_if $label$2 - (i32.eqz - (get_local $8) - ) - ) - (call $_ZdlPv - (get_local $8) - ) - ) - (br_if $label$0 - (i32.eqz - (tee_local $2 - (i32.load offset=32 - (get_local $9) - ) - ) - ) - ) - ) - (block $label$11 - (block $label$12 - (br_if $label$12 - (i32.eq - (tee_local $8 - (i32.load - (tee_local $7 - (i32.add - (get_local $9) - (i32.const 36) - ) - ) - ) - ) - (get_local $2) - ) - ) - (loop $label$13 - (set_local $0 - (i32.load - (tee_local $8 - (i32.add - (get_local $8) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $8) - (i32.const 0) - ) - (block $label$14 - (br_if $label$14 - (i32.eqz - (get_local $0) - ) - ) - (call $_ZdlPv - (get_local $0) - ) - ) - (br_if $label$13 - (i32.ne - (get_local $2) - (get_local $8) - ) - ) - ) - (set_local $8 - (i32.load - (i32.add - (get_local $9) - (i32.const 32) - ) - ) - ) - (br $label$11) - ) - (set_local $8 - (get_local $2) - ) - ) - (i32.store - (get_local $7) - (get_local $2) - ) - (call $_ZdlPv - (get_local $8) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $9) - (i32.const 80) - ) - ) - ) - (func $_ZN5eosio15dispatch_inlineIJyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEEvyyNS2_6vectorINS_16permission_levelENS6_ISA_EEEENS2_5tupleIJDpT_EEE (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $9 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 96) - ) - ) - ) - (i32.store offset=16 - (get_local $9) - (i32.const 0) - ) - (i64.store offset=8 - (get_local $9) - (i64.const 0) - ) - (set_local $6 - (i32.const 0) - ) - (set_local $7 - (i32.const 0) - ) - (set_local $8 - (i32.const 0) - ) - (block $label$0 - (block $label$1 - (br_if $label$1 - (i32.eqz - (tee_local $5 - (i32.shr_s - (tee_local $4 - (i32.sub - (i32.load offset=4 - (get_local $2) - ) - (i32.load - (get_local $2) - ) - ) - ) - (i32.const 4) - ) - ) - ) - ) - (br_if $label$0 - (i32.ge_u - (get_local $5) - (i32.const 268435456) - ) - ) - (i32.store - (i32.add - (get_local $9) - (i32.const 16) - ) - (tee_local $6 - (i32.add - (tee_local $8 - (call $_Znwj - (get_local $4) - ) - ) - (i32.shl - (get_local $5) - (i32.const 4) - ) - ) - ) - ) - (i32.store offset=8 - (get_local $9) - (get_local $8) - ) - (i32.store offset=12 - (get_local $9) - (get_local $8) - ) - (block $label$2 - (br_if $label$2 - (i32.lt_s - (tee_local $2 - (i32.sub - (i32.load - (i32.add - (get_local $2) - (i32.const 4) - ) - ) - (tee_local $7 - (i32.load - (get_local $2) - ) - ) - ) - ) - (i32.const 1) - ) - ) - (drop - (call $memcpy - (get_local $8) - (get_local $7) - (get_local $2) - ) - ) - (i32.store offset=12 - (get_local $9) - (tee_local $7 - (i32.add - (get_local $8) - (get_local $2) - ) - ) - ) - (br $label$1) - ) - (set_local $7 - (get_local $8) - ) - ) - (i32.store - (i32.add - (get_local $9) - (i32.const 44) - ) - (get_local $7) - ) - (i64.store offset=32 - (get_local $9) - (get_local $1) - ) - (i32.store - (i32.add - (get_local $9) - (i32.const 16) - ) - (i32.const 0) - ) - (i32.store - (i32.add - (get_local $9) - (i32.const 48) - ) - (get_local $6) - ) - (i64.store offset=24 - (get_local $9) - (get_local $0) - ) - (i32.store offset=40 - (get_local $9) - (get_local $8) - ) - (i64.store offset=8 - (get_local $9) - (i64.const 0) - ) - (i32.store offset=52 - (get_local $9) - (i32.const 0) - ) - (i32.store - (i32.add - (i32.add - (get_local $9) - (i32.const 24) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (i32.store - (i32.add - (i32.add - (get_local $9) - (i32.const 24) - ) - (i32.const 36) - ) - (i32.const 0) - ) - (set_local $8 - (i32.add - (tee_local $2 - (select - (i32.load - (i32.add - (get_local $3) - (i32.const 36) - ) - ) - (i32.shr_u - (tee_local $8 - (i32.load8_u offset=32 - (get_local $3) - ) - ) - (i32.const 1) - ) - (i32.and - (get_local $8) - (i32.const 1) - ) - ) - ) - (i32.const 32) - ) - ) - (set_local $0 - (i64.extend_u/i32 - (get_local $2) - ) - ) - (set_local $2 - (i32.add - (get_local $9) - (i32.const 52) - ) - ) - (loop $label$3 - (set_local $8 - (i32.add - (get_local $8) - (i32.const 1) - ) - ) - (br_if $label$3 - (i64.ne - (tee_local $0 - (i64.shr_u - (get_local $0) - (i64.const 7) - ) - ) - (i64.const 0) - ) - ) - ) - (block $label$4 - (block $label$5 - (br_if $label$5 - (i32.eqz - (get_local $8) - ) - ) - (call $_ZNSt3__16vectorIcNS_9allocatorIcEEE8__appendEj - (get_local $2) - (get_local $8) - ) - (set_local $2 - (i32.load - (i32.add - (get_local $9) - (i32.const 56) - ) - ) - ) - (set_local $8 - (i32.load - (i32.add - (get_local $9) - (i32.const 52) - ) - ) - ) - (br $label$4) - ) - (set_local $2 - (i32.const 0) - ) - (set_local $8 - (i32.const 0) - ) - ) - (i32.store offset=84 - (get_local $9) - (get_local $8) - ) - (i32.store offset=80 - (get_local $9) - (get_local $8) - ) - (i32.store offset=88 - (get_local $9) - (get_local $2) - ) - (i32.store offset=64 - (get_local $9) - (i32.add - (get_local $9) - (i32.const 80) - ) - ) - (i32.store offset=72 - (get_local $9) - (get_local $3) - ) - (call $_ZN5boost6fusion6detail17for_each_unrolledILi4EE4callINS0_18std_tuple_iteratorIKNSt3__15tupleIJyyN5eosio5assetENS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEEEELi0EEEZNS8_lsINS8_10datastreamIPcEEJyyS9_SF_EEERT_SO_RKNS7_IJDpT0_EEEEUlRKSN_E_EEvSV_RKT0_ - (i32.add - (get_local $9) - (i32.const 72) - ) - (i32.add - (get_local $9) - (i32.const 64) - ) - ) - (call $_ZN5eosio4packINS_6actionEEENSt3__16vectorIcNS2_9allocatorIcEEEERKT_ - (i32.add - (get_local $9) - (i32.const 80) - ) - (i32.add - (get_local $9) - (i32.const 24) - ) - ) - (call $send_inline - (tee_local $8 - (i32.load offset=80 - (get_local $9) - ) - ) - (i32.sub - (i32.load offset=84 - (get_local $9) - ) - (get_local $8) - ) - ) - (block $label$6 - (br_if $label$6 - (i32.eqz - (tee_local $8 - (i32.load offset=80 - (get_local $9) - ) - ) - ) - ) - (i32.store offset=84 - (get_local $9) - (get_local $8) - ) - (call $_ZdlPv - (get_local $8) - ) - ) - (block $label$7 - (br_if $label$7 - (i32.eqz - (tee_local $8 - (i32.load offset=52 - (get_local $9) - ) - ) - ) - ) - (i32.store - (i32.add - (get_local $9) - (i32.const 56) - ) - (get_local $8) - ) - (call $_ZdlPv - (get_local $8) - ) - ) - (block $label$8 - (br_if $label$8 - (i32.eqz - (tee_local $8 - (i32.load offset=40 - (get_local $9) - ) - ) - ) - ) - (i32.store - (i32.add - (get_local $9) - (i32.const 44) - ) - (get_local $8) - ) - (call $_ZdlPv - (get_local $8) - ) - ) - (block $label$9 - (br_if $label$9 - (i32.eqz - (tee_local $8 - (i32.load offset=8 - (get_local $9) - ) - ) - ) - ) - (i32.store offset=12 - (get_local $9) - (get_local $8) - ) - (call $_ZdlPv - (get_local $8) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $9) - (i32.const 96) - ) - ) - (return) - ) - (call $_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv - (i32.add - (get_local $9) - (i32.const 8) - ) - ) - (unreachable) - ) - (func $_ZNSt3__16vectorIcNS_9allocatorIcEEE8__appendEj (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (block $label$0 - (block $label$1 - (block $label$2 - (block $label$3 - (block $label$4 - (br_if $label$4 - (i32.ge_u - (i32.sub - (tee_local $2 - (i32.load offset=8 - (get_local $0) - ) - ) - (tee_local $6 - (i32.load offset=4 - (get_local $0) - ) - ) - ) - (get_local $1) - ) - ) - (br_if $label$2 - (i32.le_s - (tee_local $4 - (i32.add - (tee_local $3 - (i32.sub - (get_local $6) - (tee_local $5 - (i32.load - (get_local $0) - ) - ) - ) - ) - (get_local $1) - ) - ) - (i32.const -1) - ) - ) - (set_local $6 - (i32.const 2147483647) - ) - (block $label$5 - (br_if $label$5 - (i32.gt_u - (tee_local $2 - (i32.sub - (get_local $2) - (get_local $5) - ) - ) - (i32.const 1073741822) - ) - ) - (br_if $label$3 - (i32.eqz - (tee_local $6 - (select - (get_local $4) - (tee_local $6 - (i32.shl - (get_local $2) - (i32.const 1) - ) - ) - (i32.lt_u - (get_local $6) - (get_local $4) - ) - ) - ) - ) - ) - ) - (set_local $2 - (call $_Znwj - (get_local $6) - ) - ) - (br $label$1) - ) - (set_local $0 - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - (loop $label$6 - (i32.store8 - (get_local $6) - (i32.const 0) - ) - (i32.store - (get_local $0) - (tee_local $6 - (i32.add - (i32.load - (get_local $0) - ) - (i32.const 1) - ) - ) - ) - (br_if $label$6 - (tee_local $1 - (i32.add - (get_local $1) - (i32.const -1) - ) - ) - ) - (br $label$0) - ) - ) - (set_local $6 - (i32.const 0) - ) - (set_local $2 - (i32.const 0) - ) - (br $label$1) - ) - (call $_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv - (get_local $0) - ) - (unreachable) - ) - (set_local $4 - (i32.add - (get_local $2) - (get_local $6) - ) - ) - (set_local $6 - (tee_local $5 - (i32.add - (get_local $2) - (get_local $3) - ) - ) - ) - (loop $label$7 - (i32.store8 - (get_local $6) - (i32.const 0) - ) - (set_local $6 - (i32.add - (get_local $6) - (i32.const 1) - ) - ) - (br_if $label$7 - (tee_local $1 - (i32.add - (get_local $1) - (i32.const -1) - ) - ) - ) - ) - (set_local $5 - (i32.sub - (get_local $5) - (tee_local $2 - (i32.sub - (i32.load - (tee_local $3 - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (tee_local $1 - (i32.load - (get_local $0) - ) - ) - ) - ) - ) - ) - (block $label$8 - (br_if $label$8 - (i32.lt_s - (get_local $2) - (i32.const 1) - ) - ) - (drop - (call $memcpy - (get_local $5) - (get_local $1) - (get_local $2) - ) - ) - (set_local $1 - (i32.load - (get_local $0) - ) - ) - ) - (i32.store - (get_local $0) - (get_local $5) - ) - (i32.store - (get_local $3) - (get_local $6) - ) - (i32.store - (i32.add - (get_local $0) - (i32.const 8) - ) - (get_local $4) - ) - (br_if $label$0 - (i32.eqz - (get_local $1) - ) - ) - (call $_ZdlPv - (get_local $1) - ) - (return) - ) - ) - (func $_ZN5boost6fusion6detail17for_each_unrolledILi4EE4callINS0_18std_tuple_iteratorIKNSt3__15tupleIJyyN5eosio5assetENS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEEEELi0EEEZNS8_lsINS8_10datastreamIPcEEJyyS9_SF_EEERT_SO_RKNS7_IJDpT0_EEEEUlRKSN_E_EEvSV_RKT0_ (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (set_local $2 - (i32.load - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load offset=8 - (tee_local $3 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $3) - ) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load offset=4 - (get_local $3) - ) - (get_local $2) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (set_local $0 - (i32.load - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load offset=8 - (tee_local $3 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $3) - ) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load offset=4 - (get_local $3) - ) - (i32.add - (get_local $0) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load offset=8 - (tee_local $3 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $3) - ) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load offset=4 - (get_local $3) - ) - (i32.add - (get_local $0) - (i32.const 16) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (tee_local $2 - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load offset=8 - (get_local $3) - ) - (get_local $2) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load offset=4 - (get_local $3) - ) - (i32.add - (get_local $0) - (i32.const 24) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (drop - (call $_ZN5eosiolsINS_10datastreamIPcEEEERT_S5_RKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE - (i32.load - (get_local $1) - ) - (i32.add - (get_local $0) - (i32.const 32) - ) - ) - ) - ) - (func $_ZN5eosio4packINS_6actionEEENSt3__16vectorIcNS2_9allocatorIcEEEERKT_ (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i32) - (local $8 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $8 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 16) - ) - ) - ) - (i32.store offset=8 - (get_local $0) - (i32.const 0) - ) - (i64.store align=4 - (get_local $0) - (i64.const 0) - ) - (set_local $5 - (i32.const 16) - ) - (set_local $2 - (i32.add - (get_local $1) - (i32.const 16) - ) - ) - (set_local $6 - (i64.extend_u/i32 - (i32.shr_s - (tee_local $4 - (i32.sub - (tee_local $7 - (i32.load - (i32.add - (get_local $1) - (i32.const 20) - ) - ) - ) - (tee_local $3 - (i32.load offset=16 - (get_local $1) - ) - ) - ) - ) - (i32.const 4) - ) - ) - ) - (loop $label$0 - (set_local $5 - (i32.add - (get_local $5) - (i32.const 1) - ) - ) - (br_if $label$0 - (i64.ne - (tee_local $6 - (i64.shr_u - (get_local $6) - (i64.const 7) - ) - ) - (i64.const 0) - ) - ) - ) - (block $label$1 - (br_if $label$1 - (i32.eq - (get_local $3) - (get_local $7) - ) - ) - (set_local $5 - (i32.add - (i32.and - (get_local $4) - (i32.const -16) - ) - (get_local $5) - ) - ) - ) - (set_local $5 - (i32.sub - (i32.sub - (tee_local $7 - (i32.load offset=28 - (get_local $1) - ) - ) - (get_local $5) - ) - (tee_local $3 - (i32.load - (i32.add - (get_local $1) - (i32.const 32) - ) - ) - ) - ) - ) - (set_local $4 - (i32.add - (get_local $1) - (i32.const 28) - ) - ) - (set_local $6 - (i64.extend_u/i32 - (i32.sub - (get_local $3) - (get_local $7) - ) - ) - ) - (loop $label$2 - (set_local $5 - (i32.add - (get_local $5) - (i32.const -1) - ) - ) - (br_if $label$2 - (i64.ne - (tee_local $6 - (i64.shr_u - (get_local $6) - (i64.const 7) - ) - ) - (i64.const 0) - ) - ) - ) - (set_local $7 - (i32.const 0) - ) - (block $label$3 - (block $label$4 - (br_if $label$4 - (i32.eqz - (get_local $5) - ) - ) - (call $_ZNSt3__16vectorIcNS_9allocatorIcEEE8__appendEj - (get_local $0) - (i32.sub - (i32.const 0) - (get_local $5) - ) - ) - (set_local $7 - (i32.load - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (set_local $5 - (i32.load - (get_local $0) - ) - ) - (br $label$3) - ) - (set_local $5 - (i32.const 0) - ) - ) - (i32.store - (get_local $8) - (get_local $5) - ) - (i32.store offset=8 - (get_local $8) - (get_local $7) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (get_local $7) - (get_local $5) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (get_local $5) - (get_local $1) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (get_local $7) - (tee_local $0 - (i32.add - (get_local $5) - (i32.const 8) - ) - ) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (get_local $0) - (i32.add - (get_local $1) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $8) - (i32.add - (get_local $5) - (i32.const 16) - ) - ) - (drop - (call $_ZN5eosiolsINS_10datastreamIPcEEEERT_S5_RKNSt3__16vectorIcNS6_9allocatorIcEEEE - (call $_ZN5eosiolsINS_10datastreamIPcEENS_16permission_levelEEERT_S6_RKNSt3__16vectorIT0_NS7_9allocatorIS9_EEEE - (get_local $8) - (get_local $2) - ) - (get_local $4) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $8) - (i32.const 16) - ) - ) - ) - (func $_ZN5eosiolsINS_10datastreamIPcEENS_16permission_levelEEERT_S6_RKNSt3__16vectorIT0_NS7_9allocatorIS9_EEEE (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $7 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 16) - ) - ) - ) - (set_local $4 - (i64.extend_u/i32 - (i32.shr_s - (i32.sub - (i32.load offset=4 - (get_local $1) - ) - (i32.load - (get_local $1) - ) - ) - (i32.const 4) - ) - ) - ) - (set_local $5 - (i32.load offset=4 - (get_local $0) - ) - ) - (set_local $2 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (loop $label$0 - (set_local $3 - (i32.wrap/i64 - (get_local $4) - ) - ) - (i32.store8 offset=15 - (get_local $7) - (i32.or - (i32.shl - (tee_local $6 - (i64.ne - (tee_local $4 - (i64.shr_u - (get_local $4) - (i64.const 7) - ) - ) - (i64.const 0) - ) - ) - (i32.const 7) - ) - (i32.and - (get_local $3) - (i32.const 127) - ) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load - (get_local $2) - ) - (get_local $5) - ) - (i32.const 0) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load - (tee_local $3 - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (i32.add - (get_local $7) - (i32.const 15) - ) - (i32.const 1) - ) - ) - (i32.store - (get_local $3) - (tee_local $5 - (i32.add - (i32.load - (get_local $3) - ) - (i32.const 1) - ) - ) - ) - (br_if $label$0 - (get_local $6) - ) - ) - (block $label$1 - (br_if $label$1 - (i32.eq - (tee_local $6 - (i32.load - (get_local $1) - ) - ) - (tee_local $1 - (i32.load - (i32.add - (get_local $1) - (i32.const 4) - ) - ) - ) - ) - ) - (set_local $3 - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - (loop $label$2 - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load - (tee_local $2 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - ) - (get_local $5) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load - (get_local $3) - ) - (get_local $6) - (i32.const 8) - ) - ) - (i32.store - (get_local $3) - (tee_local $5 - (i32.add - (i32.load - (get_local $3) - ) - (i32.const 8) - ) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load - (get_local $2) - ) - (get_local $5) - ) - (i32.const 7) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load - (get_local $3) - ) - (i32.add - (get_local $6) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (i32.store - (get_local $3) - (tee_local $5 - (i32.add - (i32.load - (get_local $3) - ) - (i32.const 8) - ) - ) - ) - (br_if $label$2 - (i32.ne - (tee_local $6 - (i32.add - (get_local $6) - (i32.const 16) - ) - ) - (get_local $1) - ) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $7) - (i32.const 16) - ) - ) - (get_local $0) - ) - (func $_ZN5eosiolsINS_10datastreamIPcEEEERT_S5_RKNSt3__16vectorIcNS6_9allocatorIcEEEE (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $8 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 16) - ) - ) - ) - (set_local $7 - (i64.extend_u/i32 - (i32.sub - (i32.load offset=4 - (get_local $1) - ) - (i32.load - (get_local $1) - ) - ) - ) - ) - (set_local $6 - (i32.load offset=4 - (get_local $0) - ) - ) - (set_local $4 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (set_local $5 - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - (loop $label$0 - (set_local $2 - (i32.wrap/i64 - (get_local $7) - ) - ) - (i32.store8 offset=15 - (get_local $8) - (i32.or - (i32.shl - (tee_local $3 - (i64.ne - (tee_local $7 - (i64.shr_u - (get_local $7) - (i64.const 7) - ) - ) - (i64.const 0) - ) - ) - (i32.const 7) - ) - (i32.and - (get_local $2) - (i32.const 127) - ) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load - (get_local $4) - ) - (get_local $6) - ) - (i32.const 0) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load - (get_local $5) - ) - (i32.add - (get_local $8) - (i32.const 15) - ) - (i32.const 1) - ) - ) - (i32.store - (get_local $5) - (tee_local $6 - (i32.add - (i32.load - (get_local $5) - ) - (i32.const 1) - ) - ) - ) - (br_if $label$0 - (get_local $3) - ) - ) - (call $eosio_assert - (i32.ge_s - (i32.sub - (i32.load - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (get_local $6) - ) - (tee_local $5 - (i32.sub - (i32.load - (i32.add - (get_local $1) - (i32.const 4) - ) - ) - (tee_local $2 - (i32.load - (get_local $1) - ) - ) - ) - ) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load - (tee_local $6 - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (get_local $2) - (get_local $5) - ) - ) - (i32.store - (get_local $6) - (i32.add - (i32.load - (get_local $6) - ) - (get_local $5) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $8) - (i32.const 16) - ) - ) - (get_local $0) - ) - (func $_ZN5eosiolsINS_10datastreamIPcEEEERT_S5_RKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $8 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 16) - ) - ) - ) - (set_local $7 - (i64.extend_u/i32 - (select - (i32.load offset=4 - (get_local $1) - ) - (i32.shr_u - (tee_local $5 - (i32.load8_u - (get_local $1) - ) - ) - (i32.const 1) - ) - (i32.and - (get_local $5) - (i32.const 1) - ) - ) - ) - ) - (set_local $6 - (i32.load offset=4 - (get_local $0) - ) - ) - (set_local $4 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (set_local $5 - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - (loop $label$0 - (set_local $2 - (i32.wrap/i64 - (get_local $7) - ) - ) - (i32.store8 offset=15 - (get_local $8) - (i32.or - (i32.shl - (tee_local $3 - (i64.ne - (tee_local $7 - (i64.shr_u - (get_local $7) - (i64.const 7) - ) - ) - (i64.const 0) - ) - ) - (i32.const 7) - ) - (i32.and - (get_local $2) - (i32.const 127) - ) - ) - ) - (call $eosio_assert - (i32.gt_s - (i32.sub - (i32.load - (get_local $4) - ) - (get_local $6) - ) - (i32.const 0) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load - (get_local $5) - ) - (i32.add - (get_local $8) - (i32.const 15) - ) - (i32.const 1) - ) - ) - (i32.store - (get_local $5) - (tee_local $6 - (i32.add - (i32.load - (get_local $5) - ) - (i32.const 1) - ) - ) - ) - (br_if $label$0 - (get_local $3) - ) - ) - (block $label$1 - (br_if $label$1 - (i32.eqz - (tee_local $5 - (select - (i32.load - (i32.add - (get_local $1) - (i32.const 4) - ) - ) - (i32.shr_u - (tee_local $5 - (i32.load8_u - (get_local $1) - ) - ) - (i32.const 1) - ) - (tee_local $2 - (i32.and - (get_local $5) - (i32.const 1) - ) - ) - ) - ) - ) - ) - (set_local $3 - (i32.load offset=8 - (get_local $1) - ) - ) - (call $eosio_assert - (i32.ge_s - (i32.sub - (i32.load - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (get_local $6) - ) - (get_local $5) - ) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.load - (tee_local $6 - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (select - (get_local $3) - (i32.add - (get_local $1) - (i32.const 1) - ) - (get_local $2) - ) - (get_local $5) - ) - ) - (i32.store - (get_local $6) - (i32.add - (i32.load - (get_local $6) - ) - (get_local $5) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $8) - (i32.const 16) - ) - ) - (get_local $0) - ) - (func $_ZN5eosio5token6retireENS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $9 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 160) - ) - ) - ) - (set_local $7 - (i32.const 0) - ) - (set_local $6 - (tee_local $8 - (i64.shr_u - (tee_local $3 - (i64.load offset=8 - (get_local $1) - ) - ) - (i64.const 8) - ) - ) - ) - (block $label$0 - (block $label$1 - (loop $label$2 - (br_if $label$1 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $6) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$3 - (br_if $label$3 - (i64.ne - (i64.and - (tee_local $6 - (i64.shr_u - (get_local $6) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$4 - (br_if $label$1 - (i64.ne - (i64.and - (tee_local $6 - (i64.shr_u - (get_local $6) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$4 - (i32.lt_s - (tee_local $7 - (i32.add - (get_local $7) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $5 - (i32.const 1) - ) - (br_if $label$2 - (i32.lt_s - (tee_local $7 - (i32.add - (get_local $7) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$0) - ) - ) - (set_local $5 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $5) - (i32.const 16) - ) - (block $label$5 - (block $label$6 - (br_if $label$6 - (i32.and - (tee_local $7 - (i32.load8_u - (get_local $2) - ) - ) - (i32.const 1) - ) - ) - (set_local $7 - (i32.shr_u - (get_local $7) - (i32.const 1) - ) - ) - (br $label$5) - ) - (set_local $7 - (i32.load offset=4 - (get_local $2) - ) - ) - ) - (call $eosio_assert - (i32.lt_u - (get_local $7) - (i32.const 257) - ) - (i32.const 976) - ) - (set_local $2 - (i32.const 0) - ) - (i32.store - (i32.add - (i32.add - (get_local $9) - (i32.const 40) - ) - (i32.const 32) - ) - (i32.const 0) - ) - (i64.store offset=56 - (get_local $9) - (i64.const -1) - ) - (i64.store offset=64 - (get_local $9) - (i64.const 0) - ) - (i64.store offset=40 - (get_local $9) - (tee_local $6 - (i64.load - (get_local $0) - ) - ) - ) - (i64.store offset=48 - (get_local $9) - (get_local $8) - ) - (set_local $5 - (i32.const 0) - ) - (block $label$7 - (br_if $label$7 - (i32.lt_s - (tee_local $7 - (call $db_find_i64 - (get_local $6) - (get_local $8) - (i64.const -4157508551318700032) - (get_local $8) - ) - ) - (i32.const 0) - ) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=40 - (tee_local $5 - (call $_ZNK5eosio11multi_indexILy14289235522390851584ENS_5token12currencystatEJEE31load_object_by_primary_iteratorEl - (i32.add - (get_local $9) - (i32.const 40) - ) - (get_local $7) - ) - ) - ) - (i32.add - (get_local $9) - (i32.const 40) - ) - ) - (i32.const 96) - ) - ) - (call $eosio_assert - (i32.ne - (get_local $5) - (i32.const 0) - ) - (i32.const 1168) - ) - (call $require_auth - (i64.load offset=32 - (get_local $5) - ) - ) - (set_local $4 - (i32.add - (get_local $5) - (i32.const 32) - ) - ) - (block $label$8 - (br_if $label$8 - (i64.gt_u - (i64.add - (tee_local $6 - (i64.load - (get_local $1) - ) - ) - (i64.const 4611686018427387903) - ) - (i64.const 9223372036854775806) - ) - ) - (set_local $7 - (i32.const 0) - ) - (block $label$9 - (loop $label$10 - (br_if $label$9 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $8) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$11 - (br_if $label$11 - (i64.ne - (i64.and - (tee_local $8 - (i64.shr_u - (get_local $8) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$12 - (br_if $label$9 - (i64.ne - (i64.and - (tee_local $8 - (i64.shr_u - (get_local $8) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$12 - (i32.lt_s - (tee_local $7 - (i32.add - (get_local $7) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $2 - (i32.const 1) - ) - (br_if $label$10 - (i32.lt_s - (tee_local $7 - (i32.add - (get_local $7) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$8) - ) - ) - (set_local $2 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $2) - (i32.const 544) - ) - (call $eosio_assert - (i64.gt_s - (get_local $6) - (i64.const 0) - ) - (i32.const 1216) - ) - (call $eosio_assert - (i64.eq - (get_local $3) - (i64.load offset=8 - (get_local $5) - ) - ) - (i32.const 608) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=40 - (get_local $5) - ) - (i32.add - (get_local $9) - (i32.const 40) - ) - ) - (i32.const 688) - ) - (call $eosio_assert - (i64.eq - (i64.load offset=40 - (get_local $9) - ) - (call $current_receiver) - ) - (i32.const 736) - ) - (call $eosio_assert - (i64.eq - (get_local $3) - (tee_local $8 - (i64.load offset=8 - (get_local $5) - ) - ) - ) - (i32.const 1248) - ) - (i64.store - (get_local $5) - (tee_local $6 - (i64.sub - (i64.load - (get_local $5) - ) - (get_local $6) - ) - ) - ) - (call $eosio_assert - (i64.gt_s - (get_local $6) - (i64.const -4611686018427387904) - ) - (i32.const 1296) - ) - (call $eosio_assert - (i64.lt_s - (i64.load - (get_local $5) - ) - (i64.const 4611686018427387904) - ) - (i32.const 1328) - ) - (call $eosio_assert - (i64.eq - (tee_local $6 - (i64.shr_u - (get_local $8) - (i64.const 8) - ) - ) - (i64.shr_u - (i64.load offset=8 - (get_local $5) - ) - (i64.const 8) - ) - ) - (i32.const 912) - ) - (i32.store offset=128 - (get_local $9) - (i32.add - (i32.add - (get_local $9) - (i32.const 80) - ) - (i32.const 40) - ) - ) - (i32.store offset=124 - (get_local $9) - (i32.add - (get_local $9) - (i32.const 80) - ) - ) - (i32.store offset=120 - (get_local $9) - (i32.add - (get_local $9) - (i32.const 80) - ) - ) - (i32.store offset=136 - (get_local $9) - (i32.add - (get_local $9) - (i32.const 120) - ) - ) - (i32.store offset=148 - (get_local $9) - (i32.add - (get_local $5) - (i32.const 16) - ) - ) - (i32.store offset=144 - (get_local $9) - (get_local $5) - ) - (i32.store offset=152 - (get_local $9) - (get_local $4) - ) - (call $_ZN5boost3pfr6detail19for_each_field_implINS1_14sequence_tuple5tupleIJRKN5eosio5assetES8_RKyEEEZNS5_lsINS5_10datastreamIPcEENS5_5token12currencystatELPv0EEERT_SK_RKT0_EUlRKSJ_E_JLj0ELj1ELj2EEEEvSK_OSL_NSt3__116integer_sequenceIjJXspT1_EEEENSS_17integral_constantIbLb0EEE - (i32.add - (get_local $9) - (i32.const 144) - ) - (i32.add - (get_local $9) - (i32.const 136) - ) - ) - (call $db_update_i64 - (i32.load offset=44 - (get_local $5) - ) - (i64.const 0) - (i32.add - (get_local $9) - (i32.const 80) - ) - (i32.const 40) - ) - (block $label$13 - (br_if $label$13 - (i64.lt_u - (get_local $6) - (i64.load - (tee_local $7 - (i32.add - (i32.add - (get_local $9) - (i32.const 40) - ) - (i32.const 16) - ) - ) - ) - ) - ) - (i64.store - (get_local $7) - (i64.add - (get_local $6) - (i64.const 1) - ) - ) - ) - (i32.store - (tee_local $7 - (i32.add - (i32.add - (get_local $9) - (i32.const 24) - ) - (i32.const 12) - ) - ) - (i32.load - (i32.add - (get_local $1) - (i32.const 12) - ) - ) - ) - (i32.store - (tee_local $5 - (i32.add - (i32.add - (get_local $9) - (i32.const 24) - ) - (i32.const 8) - ) - ) - (i32.load - (i32.add - (get_local $1) - (i32.const 8) - ) - ) - ) - (i32.store offset=28 - (get_local $9) - (i32.load - (i32.add - (get_local $1) - (i32.const 4) - ) - ) - ) - (i32.store offset=24 - (get_local $9) - (i32.load - (get_local $1) - ) - ) - (set_local $6 - (i64.load - (get_local $4) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $9) - (i32.const 8) - ) - (i32.const 12) - ) - (i32.load - (get_local $7) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $9) - (i32.const 8) - ) - (i32.const 8) - ) - (i32.load - (get_local $5) - ) - ) - (i32.store offset=12 - (get_local $9) - (i32.load offset=28 - (get_local $9) - ) - ) - (i32.store offset=8 - (get_local $9) - (i32.load offset=24 - (get_local $9) - ) - ) - (call $_ZN5eosio5token11sub_balanceEyNS_5assetE - (get_local $0) - (get_local $6) - (i32.add - (get_local $9) - (i32.const 8) - ) - ) - (block $label$14 - (br_if $label$14 - (i32.eqz - (tee_local $1 - (i32.load offset=64 - (get_local $9) - ) - ) - ) - ) - (block $label$15 - (block $label$16 - (br_if $label$16 - (i32.eq - (tee_local $7 - (i32.load - (tee_local $2 - (i32.add - (get_local $9) - (i32.const 68) - ) - ) - ) - ) - (get_local $1) - ) - ) - (loop $label$17 - (set_local $5 - (i32.load - (tee_local $7 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $7) - (i32.const 0) - ) - (block $label$18 - (br_if $label$18 - (i32.eqz - (get_local $5) - ) - ) - (call $_ZdlPv - (get_local $5) - ) - ) - (br_if $label$17 - (i32.ne - (get_local $1) - (get_local $7) - ) - ) - ) - (set_local $7 - (i32.load - (i32.add - (get_local $9) - (i32.const 64) - ) - ) - ) - (br $label$15) - ) - (set_local $7 - (get_local $1) - ) - ) - (i32.store - (get_local $2) - (get_local $1) - ) - (call $_ZdlPv - (get_local $7) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $9) - (i32.const 160) - ) - ) - ) - (func $_ZN5eosio5token11sub_balanceEyNS_5assetE (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - (local $6 i64) - (local $7 i32) - (local $8 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $8 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 64) - ) - ) - ) - (i32.store - (i32.add - (get_local $8) - (i32.const 40) - ) - (i32.const 0) - ) - (i64.store offset=16 - (get_local $8) - (get_local $1) - ) - (i64.store offset=24 - (get_local $8) - (i64.const -1) - ) - (i64.store offset=32 - (get_local $8) - (i64.const 0) - ) - (i64.store offset=8 - (get_local $8) - (i64.load - (get_local $0) - ) - ) - (call $eosio_assert - (i64.ge_s - (i64.load - (tee_local $0 - (call $_ZNK5eosio11multi_indexILy3607749779137757184ENS_5token7accountEJEE3getEyPKc - (i32.add - (get_local $8) - (i32.const 8) - ) - (i64.shr_u - (tee_local $3 - (i64.load offset=8 - (get_local $2) - ) - ) - (i64.const 8) - ) - (i32.const 400) - ) - ) - ) - (tee_local $4 - (i64.load - (get_local $2) - ) - ) - ) - (i32.const 1360) - ) - (block $label$0 - (block $label$1 - (block $label$2 - (br_if $label$2 - (i64.ne - (get_local $4) - (i64.load - (get_local $0) - ) - ) - ) - (call $_ZN5eosio11multi_indexILy3607749779137757184ENS_5token7accountEJEE5eraseERKS2_ - (i32.add - (get_local $8) - (i32.const 8) - ) - (get_local $0) - ) - (br_if $label$1 - (tee_local $5 - (i32.load offset=32 - (get_local $8) - ) - ) - ) - (br $label$0) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=16 - (get_local $0) - ) - (i32.add - (get_local $8) - (i32.const 8) - ) - ) - (i32.const 688) - ) - (call $eosio_assert - (i64.eq - (i64.load offset=8 - (get_local $8) - ) - (call $current_receiver) - ) - (i32.const 736) - ) - (call $eosio_assert - (i64.eq - (get_local $3) - (tee_local $6 - (i64.load offset=8 - (get_local $0) - ) - ) - ) - (i32.const 1248) - ) - (i64.store - (get_local $0) - (tee_local $4 - (i64.sub - (i64.load - (get_local $0) - ) - (get_local $4) - ) - ) - ) - (call $eosio_assert - (i64.gt_s - (get_local $4) - (i64.const -4611686018427387904) - ) - (i32.const 1296) - ) - (call $eosio_assert - (i64.lt_s - (i64.load - (get_local $0) - ) - (i64.const 4611686018427387904) - ) - (i32.const 1328) - ) - (call $eosio_assert - (i64.eq - (tee_local $4 - (i64.shr_u - (get_local $6) - (i64.const 8) - ) - ) - (i64.shr_u - (i64.load offset=8 - (get_local $0) - ) - (i64.const 8) - ) - ) - (i32.const 912) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.add - (get_local $8) - (i32.const 48) - ) - (get_local $0) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.or - (i32.add - (get_local $8) - (i32.const 48) - ) - (i32.const 8) - ) - (i32.add - (get_local $0) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (call $db_update_i64 - (i32.load offset=20 - (get_local $0) - ) - (get_local $1) - (i32.add - (get_local $8) - (i32.const 48) - ) - (i32.const 16) - ) - (block $label$3 - (br_if $label$3 - (i64.lt_u - (get_local $4) - (i64.load - (tee_local $0 - (i32.add - (i32.add - (get_local $8) - (i32.const 8) - ) - (i32.const 16) - ) - ) - ) - ) - ) - (i64.store - (get_local $0) - (i64.add - (get_local $4) - (i64.const 1) - ) - ) - ) - (br_if $label$0 - (i32.eqz - (tee_local $5 - (i32.load offset=32 - (get_local $8) - ) - ) - ) - ) - ) - (block $label$4 - (block $label$5 - (br_if $label$5 - (i32.eq - (tee_local $0 - (i32.load - (tee_local $7 - (i32.add - (get_local $8) - (i32.const 36) - ) - ) - ) - ) - (get_local $5) - ) - ) - (loop $label$6 - (set_local $2 - (i32.load - (tee_local $0 - (i32.add - (get_local $0) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $0) - (i32.const 0) - ) - (block $label$7 - (br_if $label$7 - (i32.eqz - (get_local $2) - ) - ) - (call $_ZdlPv - (get_local $2) - ) - ) - (br_if $label$6 - (i32.ne - (get_local $5) - (get_local $0) - ) - ) - ) - (set_local $0 - (i32.load - (i32.add - (get_local $8) - (i32.const 32) - ) - ) - ) - (br $label$4) - ) - (set_local $0 - (get_local $5) - ) - ) - (i32.store - (get_local $7) - (get_local $5) - ) - (call $_ZdlPv - (get_local $0) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $8) - (i32.const 64) - ) - ) - ) - (func $_ZN5eosio11multi_indexILy3607749779137757184ENS_5token7accountEJEE5eraseERKS2_ (param $0 i32) (param $1 i32) - (local $2 i64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (call $eosio_assert - (i32.eq - (i32.load offset=16 - (get_local $1) - ) - (get_local $0) - ) - (i32.const 1392) - ) - (call $eosio_assert - (i64.eq - (i64.load - (get_local $0) - ) - (call $current_receiver) - ) - (i32.const 1440) - ) - (block $label$0 - (br_if $label$0 - (i32.eq - (tee_local $7 - (i32.load - (tee_local $5 - (i32.add - (get_local $0) - (i32.const 28) - ) - ) - ) - ) - (tee_local $3 - (i32.load offset=24 - (get_local $0) - ) - ) - ) - ) - (set_local $2 - (i64.load offset=8 - (get_local $1) - ) - ) - (set_local $6 - (i32.sub - (i32.const 0) - (get_local $3) - ) - ) - (set_local $8 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - (loop $label$1 - (br_if $label$0 - (i64.lt_u - (i64.xor - (i64.load offset=8 - (i32.load - (get_local $8) - ) - ) - (get_local $2) - ) - (i64.const 256) - ) - ) - (set_local $7 - (get_local $8) - ) - (set_local $8 - (tee_local $4 - (i32.add - (get_local $8) - (i32.const -24) - ) - ) - ) - (br_if $label$1 - (i32.ne - (i32.add - (get_local $4) - (get_local $6) - ) - (i32.const -24) - ) - ) - ) - ) - (call $eosio_assert - (i32.ne - (get_local $7) - (get_local $3) - ) - (i32.const 1504) - ) - (set_local $8 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.eq - (get_local $7) - (tee_local $4 - (i32.load - (get_local $5) - ) - ) - ) - ) - (set_local $3 - (i32.sub - (i32.const 0) - (get_local $4) - ) - ) - (set_local $7 - (get_local $8) - ) - (loop $label$4 - (set_local $6 - (i32.load - (tee_local $8 - (i32.add - (get_local $7) - (i32.const 24) - ) - ) - ) - ) - (i32.store - (get_local $8) - (i32.const 0) - ) - (set_local $4 - (i32.load - (get_local $7) - ) - ) - (i32.store - (get_local $7) - (get_local $6) - ) - (block $label$5 - (br_if $label$5 - (i32.eqz - (get_local $4) - ) - ) - (call $_ZdlPv - (get_local $4) - ) - ) - (i32.store - (i32.add - (get_local $7) - (i32.const 16) - ) - (i32.load - (i32.add - (get_local $7) - (i32.const 40) - ) - ) - ) - (i64.store - (i32.add - (get_local $7) - (i32.const 8) - ) - (i64.load - (i32.add - (get_local $7) - (i32.const 32) - ) - ) - ) - (set_local $7 - (get_local $8) - ) - (br_if $label$4 - (i32.ne - (i32.add - (get_local $8) - (get_local $3) - ) - (i32.const -24) - ) - ) - ) - (br_if $label$2 - (i32.eq - (tee_local $7 - (i32.load - (i32.add - (get_local $0) - (i32.const 28) - ) - ) - ) - (get_local $8) - ) - ) - ) - (loop $label$6 - (set_local $4 - (i32.load - (tee_local $7 - (i32.add - (get_local $7) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $7) - (i32.const 0) - ) - (block $label$7 - (br_if $label$7 - (i32.eqz - (get_local $4) - ) - ) - (call $_ZdlPv - (get_local $4) - ) - ) - (br_if $label$6 - (i32.ne - (get_local $8) - (get_local $7) - ) - ) - ) - ) - (i32.store - (i32.add - (get_local $0) - (i32.const 28) - ) - (get_local $8) - ) - (call $db_remove_i64 - (i32.load offset=20 - (get_local $1) - ) - ) - ) - (func $_ZN5eosio5token8transferEyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE (type $FUNCSIG$vijjii) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i32) - (local $5 i64) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i64) - (local $10 i32) - (local $11 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $11 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 112) - ) - ) - ) - (call $eosio_assert - (i64.ne - (get_local $1) - (get_local $2) - ) - (i32.const 1568) - ) - (call $require_auth - (get_local $1) - ) - (call $eosio_assert - (call $is_account - (get_local $2) - ) - (i32.const 1600) - ) - (set_local $5 - (i64.load offset=8 - (get_local $3) - ) - ) - (set_local $8 - (i32.const 0) - ) - (i32.store - (i32.add - (get_local $11) - (i32.const 104) - ) - (i32.const 0) - ) - (i64.store offset=80 - (get_local $11) - (tee_local $9 - (i64.shr_u - (get_local $5) - (i64.const 8) - ) - ) - ) - (i64.store offset=88 - (get_local $11) - (i64.const -1) - ) - (i64.store offset=96 - (get_local $11) - (i64.const 0) - ) - (i64.store offset=72 - (get_local $11) - (i64.load - (get_local $0) - ) - ) - (set_local $6 - (call $_ZNK5eosio11multi_indexILy14289235522390851584ENS_5token12currencystatEJEE3getEyPKc - (i32.add - (get_local $11) - (i32.const 72) - ) - (get_local $9) - (i32.const 512) - ) - ) - (call $require_recipient - (get_local $1) - ) - (call $require_recipient - (get_local $2) - ) - (block $label$0 - (br_if $label$0 - (i64.gt_u - (i64.add - (tee_local $7 - (i64.load - (get_local $3) - ) - ) - (i64.const 4611686018427387903) - ) - (i64.const 9223372036854775806) - ) - ) - (set_local $10 - (i32.const 0) - ) - (block $label$1 - (loop $label$2 - (br_if $label$1 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $9) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$3 - (br_if $label$3 - (i64.ne - (i64.and - (tee_local $9 - (i64.shr_u - (get_local $9) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$4 - (br_if $label$1 - (i64.ne - (i64.and - (tee_local $9 - (i64.shr_u - (get_local $9) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$4 - (i32.lt_s - (tee_local $10 - (i32.add - (get_local $10) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $8 - (i32.const 1) - ) - (br_if $label$2 - (i32.lt_s - (tee_local $10 - (i32.add - (get_local $10) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$0) - ) - ) - (set_local $8 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $8) - (i32.const 544) - ) - (call $eosio_assert - (i64.gt_s - (get_local $7) - (i64.const 0) - ) - (i32.const 576) - ) - (call $eosio_assert - (i64.eq - (get_local $5) - (i64.load offset=8 - (get_local $6) - ) - ) - (i32.const 608) - ) - (block $label$5 - (block $label$6 - (br_if $label$6 - (i32.and - (tee_local $10 - (i32.load8_u - (get_local $4) - ) - ) - (i32.const 1) - ) - ) - (set_local $10 - (i32.shr_u - (get_local $10) - (i32.const 1) - ) - ) - (br $label$5) - ) - (set_local $10 - (i32.load offset=4 - (get_local $4) - ) - ) - ) - (call $eosio_assert - (i32.lt_u - (get_local $10) - (i32.const 257) - ) - (i32.const 976) - ) - (i64.store - (tee_local $10 - (i32.add - (i32.add - (get_local $11) - (i32.const 56) - ) - (i32.const 8) - ) - ) - (i64.load - (tee_local $8 - (i32.add - (get_local $3) - (i32.const 8) - ) - ) - ) - ) - (set_local $9 - (i64.load - (get_local $3) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $11) - (i32.const 24) - ) - (i32.const 12) - ) - (i32.load - (i32.add - (i32.add - (get_local $11) - (i32.const 56) - ) - (i32.const 12) - ) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $11) - (i32.const 24) - ) - (i32.const 8) - ) - (i32.load - (get_local $10) - ) - ) - (i64.store offset=56 - (get_local $11) - (get_local $9) - ) - (i32.store offset=28 - (get_local $11) - (i32.load offset=60 - (get_local $11) - ) - ) - (i32.store offset=24 - (get_local $11) - (i32.load offset=56 - (get_local $11) - ) - ) - (call $_ZN5eosio5token11sub_balanceEyNS_5assetE - (get_local $0) - (get_local $1) - (i32.add - (get_local $11) - (i32.const 24) - ) - ) - (i64.store - (tee_local $10 - (i32.add - (i32.add - (get_local $11) - (i32.const 40) - ) - (i32.const 8) - ) - ) - (i64.load - (get_local $8) - ) - ) - (set_local $9 - (i64.load - (get_local $3) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $11) - (i32.const 8) - ) - (i32.const 12) - ) - (i32.load - (i32.add - (i32.add - (get_local $11) - (i32.const 40) - ) - (i32.const 12) - ) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $11) - (i32.const 8) - ) - (i32.const 8) - ) - (i32.load - (get_local $10) - ) - ) - (i64.store offset=40 - (get_local $11) - (get_local $9) - ) - (i32.store offset=12 - (get_local $11) - (i32.load offset=44 - (get_local $11) - ) - ) - (i32.store offset=8 - (get_local $11) - (i32.load offset=40 - (get_local $11) - ) - ) - (call $_ZN5eosio5token11add_balanceEyNS_5assetEy - (get_local $0) - (get_local $2) - (i32.add - (get_local $11) - (i32.const 8) - ) - (get_local $1) - ) - (block $label$7 - (br_if $label$7 - (i32.eqz - (tee_local $8 - (i32.load offset=96 - (get_local $11) - ) - ) - ) - ) - (block $label$8 - (block $label$9 - (br_if $label$9 - (i32.eq - (tee_local $10 - (i32.load - (tee_local $0 - (i32.add - (get_local $11) - (i32.const 100) - ) - ) - ) - ) - (get_local $8) - ) - ) - (loop $label$10 - (set_local $3 - (i32.load - (tee_local $10 - (i32.add - (get_local $10) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $10) - (i32.const 0) - ) - (block $label$11 - (br_if $label$11 - (i32.eqz - (get_local $3) - ) - ) - (call $_ZdlPv - (get_local $3) - ) - ) - (br_if $label$10 - (i32.ne - (get_local $8) - (get_local $10) - ) - ) - ) - (set_local $10 - (i32.load - (i32.add - (get_local $11) - (i32.const 96) - ) - ) - ) - (br $label$8) - ) - (set_local $10 - (get_local $8) - ) - ) - (i32.store - (get_local $0) - (get_local $8) - ) - (call $_ZdlPv - (get_local $10) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $11) - (i32.const 112) - ) - ) - ) - (func $_ZN5eosio5token12transferfromEyyyNS_5assetENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE (type $FUNCSIG$vijjjii) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) - (local $9 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $9 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 112) - ) - ) - ) - (call $require_auth - (get_local $1) - ) - (call $_ZN5eosio5token12allowance_ofEyy - (i32.add - (get_local $9) - (i32.const 96) - ) - (get_local $0) - (get_local $2) - (get_local $1) - ) - (call $prints - (i32.const 1632) - ) - (call $printn - (get_local $1) - ) - (call $prints - (i32.const 1664) - ) - (call $_ZNK5eosio5asset5printEv - (get_local $4) - ) - (call $prints - (i32.const 1696) - ) - (call $printn - (get_local $2) - ) - (call $prints - (i32.const 1712) - ) - (call $printn - (get_local $3) - ) - (call $eosio_assert - (i64.ge_s - (i64.load offset=96 - (get_local $9) - ) - (i64.load - (get_local $4) - ) - ) - (i32.const 1728) - ) - (i64.store - (tee_local $7 - (i32.add - (i32.add - (get_local $9) - (i32.const 80) - ) - (i32.const 8) - ) - ) - (i64.load - (tee_local $6 - (i32.add - (get_local $4) - (i32.const 8) - ) - ) - ) - ) - (set_local $8 - (i64.load - (get_local $4) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $9) - (i32.const 32) - ) - (i32.const 12) - ) - (i32.load - (i32.add - (i32.add - (get_local $9) - (i32.const 80) - ) - (i32.const 12) - ) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $9) - (i32.const 32) - ) - (i32.const 8) - ) - (i32.load - (get_local $7) - ) - ) - (i64.store offset=80 - (get_local $9) - (get_local $8) - ) - (i32.store offset=36 - (get_local $9) - (i32.load offset=84 - (get_local $9) - ) - ) - (i32.store offset=32 - (get_local $9) - (i32.load offset=80 - (get_local $9) - ) - ) - (call $_ZN5eosio5token11add_balanceEyNS_5assetEy - (get_local $0) - (get_local $3) - (i32.add - (get_local $9) - (i32.const 32) - ) - (get_local $1) - ) - (i64.store - (tee_local $7 - (i32.add - (i32.add - (get_local $9) - (i32.const 64) - ) - (i32.const 8) - ) - ) - (i64.load - (get_local $6) - ) - ) - (set_local $3 - (i64.load - (get_local $4) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $9) - (i32.const 16) - ) - (i32.const 12) - ) - (i32.load - (i32.add - (i32.add - (get_local $9) - (i32.const 64) - ) - (i32.const 12) - ) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $9) - (i32.const 16) - ) - (i32.const 8) - ) - (i32.load - (get_local $7) - ) - ) - (i64.store offset=64 - (get_local $9) - (get_local $3) - ) - (i32.store offset=20 - (get_local $9) - (i32.load offset=68 - (get_local $9) - ) - ) - (i32.store offset=16 - (get_local $9) - (i32.load offset=64 - (get_local $9) - ) - ) - (call $_ZN5eosio5token16sub_balance_fromEyyNS_5assetE - (get_local $0) - (get_local $1) - (get_local $2) - (i32.add - (get_local $9) - (i32.const 16) - ) - ) - (i64.store - (tee_local $7 - (i32.add - (i32.add - (get_local $9) - (i32.const 48) - ) - (i32.const 8) - ) - ) - (tee_local $3 - (i64.load - (i32.add - (i32.add - (get_local $9) - (i32.const 96) - ) - (i32.const 8) - ) - ) - ) - ) - (i64.store offset=48 - (get_local $9) - (i64.load offset=96 - (get_local $9) - ) - ) - (call $eosio_assert - (i64.eq - (get_local $3) - (i64.load - (get_local $6) - ) - ) - (i32.const 1248) - ) - (i64.store offset=48 - (get_local $9) - (tee_local $3 - (i64.sub - (i64.load offset=48 - (get_local $9) - ) - (i64.load - (get_local $4) - ) - ) - ) - ) - (call $eosio_assert - (i64.gt_s - (get_local $3) - (i64.const -4611686018427387904) - ) - (i32.const 1296) - ) - (call $eosio_assert - (i64.lt_s - (get_local $3) - (i64.const 4611686018427387904) - ) - (i32.const 1328) - ) - (i64.store - (i32.add - (get_local $9) - (i32.const 8) - ) - (i64.load - (get_local $7) - ) - ) - (i64.store - (get_local $9) - (i64.load offset=48 - (get_local $9) - ) - ) - (call $_ZN5eosio5token13set_allowanceEyyNS_5assetEb - (get_local $0) - (get_local $2) - (get_local $1) - (get_local $9) - (i32.const 0) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $9) - (i32.const 112) - ) - ) - ) - (func $_ZN5eosio5token12allowance_ofEyy (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) - (local $4 i32) - (local $5 i64) - (local $6 i32) - (local $7 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $7 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 48) - ) - ) - ) - (i32.store - (i32.add - (get_local $7) - (i32.const 40) - ) - (i32.const 0) - ) - (i64.store offset=24 - (get_local $7) - (i64.const -1) - ) - (i64.store offset=32 - (get_local $7) - (i64.const 0) - ) - (i64.store offset=8 - (get_local $7) - (tee_local $5 - (i64.load - (get_local $1) - ) - ) - ) - (i64.store offset=16 - (get_local $7) - (get_local $2) - ) - (set_local $1 - (i32.const 0) - ) - (block $label$0 - (br_if $label$0 - (i32.lt_s - (tee_local $4 - (call $db_find_i64 - (get_local $5) - (get_local $2) - (i64.const 3774946787993190400) - (get_local $3) - ) - ) - (i32.const 0) - ) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=24 - (tee_local $1 - (call $_ZNK5eosio11multi_indexILy3774946787993190400ENS_5token9allowanceEJEE31load_object_by_primary_iteratorEl - (i32.add - (get_local $7) - (i32.const 8) - ) - (get_local $4) - ) - ) - ) - (i32.add - (get_local $7) - (i32.const 8) - ) - ) - (i32.const 96) - ) - ) - (call $eosio_assert - (i32.ne - (get_local $1) - (i32.const 0) - ) - (i32.const 1840) - ) - (i64.store - (i32.add - (get_local $0) - (i32.const 8) - ) - (i64.load - (i32.add - (get_local $1) - (i32.const 16) - ) - ) - ) - (i64.store - (get_local $0) - (i64.load offset=8 - (get_local $1) - ) - ) - (block $label$1 - (br_if $label$1 - (i32.eqz - (tee_local $4 - (i32.load offset=32 - (get_local $7) - ) - ) - ) - ) - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.eq - (tee_local $1 - (i32.load - (tee_local $6 - (i32.add - (get_local $7) - (i32.const 36) - ) - ) - ) - ) - (get_local $4) - ) - ) - (loop $label$4 - (set_local $0 - (i32.load - (tee_local $1 - (i32.add - (get_local $1) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $1) - (i32.const 0) - ) - (block $label$5 - (br_if $label$5 - (i32.eqz - (get_local $0) - ) - ) - (call $_ZdlPv - (get_local $0) - ) - ) - (br_if $label$4 - (i32.ne - (get_local $4) - (get_local $1) - ) - ) - ) - (set_local $1 - (i32.load - (i32.add - (get_local $7) - (i32.const 32) - ) - ) - ) - (br $label$2) - ) - (set_local $1 - (get_local $4) - ) - ) - (i32.store - (get_local $6) - (get_local $4) - ) - (call $_ZdlPv - (get_local $1) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $7) - (i32.const 48) - ) - ) - ) - (func $_ZNK5eosio5asset5printEv (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (set_local $10 - (tee_local $2 - (i32.load offset=4 - (i32.const 0) - ) - ) - ) - (set_local $7 - (i64.const 1) - ) - (block $label$0 - (br_if $label$0 - (tee_local $5 - (i64.eqz - (tee_local $8 - (i64.load8_u offset=8 - (get_local $0) - ) - ) - ) - ) - ) - (set_local $9 - (i64.add - (get_local $8) - (i64.const 1) - ) - ) - (set_local $7 - (i64.const 1) - ) - (loop $label$1 - (set_local $7 - (i64.mul - (get_local $7) - (i64.const 10) - ) - ) - (br_if $label$1 - (i64.gt_s - (tee_local $9 - (i64.add - (get_local $9) - (i64.const -1) - ) - ) - (i64.const 1) - ) - ) - ) - ) - (set_local $1 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (i32.store offset=4 - (i32.const 0) - (tee_local $2 - (i32.sub - (get_local $2) - (i32.and - (i32.add - (i32.wrap/i64 - (i64.add - (get_local $8) - (i64.const 1) - ) - ) - (i32.const 15) - ) - (i32.const 1008) - ) - ) - ) - ) - (i32.store8 - (tee_local $6 - (i32.add - (get_local $2) - (tee_local $3 - (i32.wrap/i64 - (get_local $8) - ) - ) - ) - ) - (i32.const 0) - ) - (set_local $4 - (i64.load - (get_local $0) - ) - ) - (block $label$2 - (br_if $label$2 - (get_local $5) - ) - (set_local $8 - (i64.add - (get_local $8) - (i64.const 1) - ) - ) - (set_local $9 - (i64.rem_s - (get_local $4) - (get_local $7) - ) - ) - (set_local $0 - (i32.add - (get_local $6) - (i32.const -1) - ) - ) - (loop $label$3 - (i64.store8 - (get_local $0) - (i64.add - (i64.rem_s - (get_local $9) - (i64.const 10) - ) - (i64.const 48) - ) - ) - (set_local $0 - (i32.add - (get_local $0) - (i32.const -1) - ) - ) - (set_local $9 - (i64.div_s - (get_local $9) - (i64.const 10) - ) - ) - (br_if $label$3 - (i64.gt_s - (tee_local $8 - (i64.add - (get_local $8) - (i64.const -1) - ) - ) - (i64.const 1) - ) - ) - ) - ) - (call $printi - (i64.div_s - (get_local $4) - (get_local $7) - ) - ) - (call $prints - (i32.const 1792) - ) - (call $prints_l - (get_local $2) - (get_local $3) - ) - (call $prints - (i32.const 1808) - ) - (call $_ZNK5eosio11symbol_type5printEb - (get_local $1) - (i32.const 0) - ) - (i32.store offset=4 - (i32.const 0) - (get_local $10) - ) - ) - (func $_ZN5eosio5token16sub_balance_fromEyyNS_5assetE (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i64) - (local $7 i32) - (local $8 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $8 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 64) - ) - ) - ) - (i32.store - (i32.add - (get_local $8) - (i32.const 40) - ) - (i32.const 0) - ) - (i64.store offset=16 - (get_local $8) - (get_local $2) - ) - (i64.store offset=24 - (get_local $8) - (i64.const -1) - ) - (i64.store offset=32 - (get_local $8) - (i64.const 0) - ) - (i64.store offset=8 - (get_local $8) - (i64.load - (get_local $0) - ) - ) - (call $eosio_assert - (i64.ge_s - (i64.load - (tee_local $0 - (call $_ZNK5eosio11multi_indexILy3607749779137757184ENS_5token7accountEJEE3getEyPKc - (i32.add - (get_local $8) - (i32.const 8) - ) - (i64.shr_u - (tee_local $4 - (i64.load offset=8 - (get_local $3) - ) - ) - (i64.const 8) - ) - (i32.const 400) - ) - ) - ) - (tee_local $2 - (i64.load - (get_local $3) - ) - ) - ) - (i32.const 1360) - ) - (block $label$0 - (block $label$1 - (block $label$2 - (br_if $label$2 - (i64.ne - (get_local $2) - (i64.load - (get_local $0) - ) - ) - ) - (call $_ZN5eosio11multi_indexILy3607749779137757184ENS_5token7accountEJEE5eraseERKS2_ - (i32.add - (get_local $8) - (i32.const 8) - ) - (get_local $0) - ) - (br_if $label$1 - (tee_local $5 - (i32.load offset=32 - (get_local $8) - ) - ) - ) - (br $label$0) - ) - (call $eosio_assert - (i32.eq - (i32.load offset=16 - (get_local $0) - ) - (i32.add - (get_local $8) - (i32.const 8) - ) - ) - (i32.const 688) - ) - (call $eosio_assert - (i64.eq - (i64.load offset=8 - (get_local $8) - ) - (call $current_receiver) - ) - (i32.const 736) - ) - (call $eosio_assert - (i64.eq - (get_local $4) - (tee_local $6 - (i64.load offset=8 - (get_local $0) - ) - ) - ) - (i32.const 1248) - ) - (i64.store - (get_local $0) - (tee_local $2 - (i64.sub - (i64.load - (get_local $0) - ) - (get_local $2) - ) - ) - ) - (call $eosio_assert - (i64.gt_s - (get_local $2) - (i64.const -4611686018427387904) - ) - (i32.const 1296) - ) - (call $eosio_assert - (i64.lt_s - (i64.load - (get_local $0) - ) - (i64.const 4611686018427387904) - ) - (i32.const 1328) - ) - (call $eosio_assert - (i64.eq - (tee_local $2 - (i64.shr_u - (get_local $6) - (i64.const 8) - ) - ) - (i64.shr_u - (i64.load offset=8 - (get_local $0) - ) - (i64.const 8) - ) - ) - (i32.const 912) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.add - (get_local $8) - (i32.const 48) - ) - (get_local $0) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 272) - ) - (drop - (call $memcpy - (i32.or - (i32.add - (get_local $8) - (i32.const 48) - ) - (i32.const 8) - ) - (i32.add - (get_local $0) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (call $db_update_i64 - (i32.load offset=20 - (get_local $0) - ) - (get_local $1) - (i32.add - (get_local $8) - (i32.const 48) - ) - (i32.const 16) - ) - (block $label$3 - (br_if $label$3 - (i64.lt_u - (get_local $2) - (i64.load - (tee_local $0 - (i32.add - (i32.add - (get_local $8) - (i32.const 8) - ) - (i32.const 16) - ) - ) - ) - ) - ) - (i64.store - (get_local $0) - (i64.add - (get_local $2) - (i64.const 1) - ) - ) - ) - (br_if $label$0 - (i32.eqz - (tee_local $5 - (i32.load offset=32 - (get_local $8) - ) - ) - ) - ) - ) - (block $label$4 - (block $label$5 - (br_if $label$5 - (i32.eq - (tee_local $0 - (i32.load - (tee_local $7 - (i32.add - (get_local $8) - (i32.const 36) - ) - ) - ) - ) - (get_local $5) - ) - ) - (loop $label$6 - (set_local $3 - (i32.load - (tee_local $0 - (i32.add - (get_local $0) - (i32.const -24) - ) - ) - ) - ) - (i32.store - (get_local $0) - (i32.const 0) - ) - (block $label$7 - (br_if $label$7 - (i32.eqz - (get_local $3) - ) - ) - (call $_ZdlPv - (get_local $3) - ) - ) - (br_if $label$6 - (i32.ne - (get_local $5) - (get_local $0) - ) - ) - ) - (set_local $0 - (i32.load - (i32.add - (get_local $8) - (i32.const 32) - ) - ) - ) - (br $label$4) - ) - (set_local $0 - (get_local $5) - ) - ) - (i32.store - (get_local $7) - (get_local $5) - ) - (call $_ZdlPv - (get_local $0) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $8) - (i32.const 64) - ) - ) - ) - (func $_ZNK5eosio11symbol_type5printEb (param $0 i32) (param $1 i32) - (local $2 i64) - (local $3 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $3 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 16) - ) - ) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (get_local $1) - ) - ) - (call $printui - (i64.load8_u - (get_local $0) - ) - ) - (call $prints - (i32.const 1824) - ) - ) - (i32.store8 offset=15 - (get_local $3) - (tee_local $0 - (i32.wrap/i64 - (i64.shr_u - (tee_local $2 - (i64.load - (get_local $0) - ) - ) - (i64.const 8) - ) - ) - ) - ) - (block $label$1 - (br_if $label$1 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 255) - ) - ) - ) - (call $prints_l - (i32.add - (get_local $3) - (i32.const 15) - ) - (i32.const 1) - ) - (i32.store8 offset=15 - (get_local $3) - (tee_local $0 - (i32.wrap/i64 - (i64.shr_u - (get_local $2) - (i64.const 16) - ) - ) - ) - ) - (br_if $label$1 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 255) - ) - ) - ) - (call $prints_l - (i32.add - (get_local $3) - (i32.const 15) - ) - (i32.const 1) - ) - (i32.store8 offset=15 - (get_local $3) - (tee_local $0 - (i32.wrap/i64 - (i64.shr_u - (get_local $2) - (i64.const 24) - ) - ) - ) - ) - (br_if $label$1 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 255) - ) - ) - ) - (call $prints_l - (i32.add - (get_local $3) - (i32.const 15) - ) - (i32.const 1) - ) - (i32.store8 offset=15 - (get_local $3) - (tee_local $0 - (i32.wrap/i64 - (i64.shr_u - (get_local $2) - (i64.const 32) - ) - ) - ) - ) - (br_if $label$1 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 255) - ) - ) - ) - (call $prints_l - (i32.add - (get_local $3) - (i32.const 15) - ) - (i32.const 1) - ) - (i32.store8 offset=15 - (get_local $3) - (tee_local $0 - (i32.wrap/i64 - (i64.shr_u - (get_local $2) - (i64.const 40) - ) - ) - ) - ) - (br_if $label$1 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 255) - ) - ) - ) - (call $prints_l - (i32.add - (get_local $3) - (i32.const 15) - ) - (i32.const 1) - ) - (i32.store8 offset=15 - (get_local $3) - (tee_local $0 - (i32.wrap/i64 - (i64.shr_u - (get_local $2) - (i64.const 48) - ) - ) - ) - ) - (br_if $label$1 - (i32.eqz - (i32.and - (get_local $0) - (i32.const 255) - ) - ) - ) - (call $prints_l - (i32.add - (get_local $3) - (i32.const 15) - ) - (i32.const 1) - ) - (i32.store8 offset=15 - (get_local $3) - (tee_local $0 - (i32.wrap/i64 - (i64.shr_u - (get_local $2) - (i64.const 56) - ) - ) - ) - ) - (br_if $label$1 - (i32.eqz - (get_local $0) - ) - ) - (call $prints_l - (i32.add - (get_local $3) - (i32.const 15) - ) - (i32.const 1) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $3) - (i32.const 16) - ) - ) - ) - (func $apply (param $0 i64) (param $1 i64) (param $2 i64) - (local $3 i32) - (local $4 i32) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $9 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 112) - ) - ) - ) - (set_local $6 - (i64.const 0) - ) - (set_local $5 - (i64.const 59) - ) - (set_local $4 - (i32.const 1888) - ) - (set_local $7 - (i64.const 0) - ) - (loop $label$0 - (block $label$1 - (block $label$2 - (block $label$3 - (block $label$4 - (block $label$5 - (br_if $label$5 - (i64.gt_u - (get_local $6) - (i64.const 6) - ) - ) - (br_if $label$4 - (i32.gt_u - (i32.and - (i32.add - (tee_local $3 - (i32.load8_s - (get_local $4) - ) - ) - (i32.const -97) - ) - (i32.const 255) - ) - (i32.const 25) - ) - ) - (set_local $3 - (i32.add - (get_local $3) - (i32.const 165) - ) - ) - (br $label$3) - ) - (set_local $8 - (i64.const 0) - ) - (br_if $label$2 - (i64.le_u - (get_local $6) - (i64.const 11) - ) - ) - (br $label$1) - ) - (set_local $3 - (select - (i32.add - (get_local $3) - (i32.const 208) - ) - (i32.const 0) - (i32.lt_u - (i32.and - (i32.add - (get_local $3) - (i32.const -49) - ) - (i32.const 255) - ) - (i32.const 5) - ) - ) - ) - ) - (set_local $8 - (i64.shr_s - (i64.shl - (i64.extend_u/i32 - (get_local $3) - ) - (i64.const 56) - ) - (i64.const 56) - ) - ) - ) - (set_local $8 - (i64.shl - (i64.and - (get_local $8) - (i64.const 31) - ) - (i64.and - (get_local $5) - (i64.const 4294967295) - ) - ) - ) - ) - (set_local $4 - (i32.add - (get_local $4) - (i32.const 1) - ) - ) - (set_local $6 - (i64.add - (get_local $6) - (i64.const 1) - ) - ) - (set_local $7 - (i64.or - (get_local $8) - (get_local $7) - ) - ) - (br_if $label$0 - (i64.ne - (tee_local $5 - (i64.add - (get_local $5) - (i64.const -5) - ) - ) - (i64.const -6) - ) - ) - ) - (block $label$6 - (br_if $label$6 - (i64.ne - (get_local $7) - (get_local $2) - ) - ) - (set_local $6 - (i64.const 0) - ) - (set_local $5 - (i64.const 59) - ) - (set_local $4 - (i32.const 1904) - ) - (set_local $7 - (i64.const 0) - ) - (loop $label$7 - (block $label$8 - (block $label$9 - (block $label$10 - (block $label$11 - (block $label$12 - (br_if $label$12 - (i64.gt_u - (get_local $6) - (i64.const 4) - ) - ) - (br_if $label$11 - (i32.gt_u - (i32.and - (i32.add - (tee_local $3 - (i32.load8_s - (get_local $4) - ) - ) - (i32.const -97) - ) - (i32.const 255) - ) - (i32.const 25) - ) - ) - (set_local $3 - (i32.add - (get_local $3) - (i32.const 165) - ) - ) - (br $label$10) - ) - (set_local $8 - (i64.const 0) - ) - (br_if $label$9 - (i64.le_u - (get_local $6) - (i64.const 11) - ) - ) - (br $label$8) - ) - (set_local $3 - (select - (i32.add - (get_local $3) - (i32.const 208) - ) - (i32.const 0) - (i32.lt_u - (i32.and - (i32.add - (get_local $3) - (i32.const -49) - ) - (i32.const 255) - ) - (i32.const 5) - ) - ) - ) - ) - (set_local $8 - (i64.shr_s - (i64.shl - (i64.extend_u/i32 - (get_local $3) - ) - (i64.const 56) - ) - (i64.const 56) - ) - ) - ) - (set_local $8 - (i64.shl - (i64.and - (get_local $8) - (i64.const 31) - ) - (i64.and - (get_local $5) - (i64.const 4294967295) - ) - ) - ) - ) - (set_local $4 - (i32.add - (get_local $4) - (i32.const 1) - ) - ) - (set_local $6 - (i64.add - (get_local $6) - (i64.const 1) - ) - ) - (set_local $7 - (i64.or - (get_local $8) - (get_local $7) - ) - ) - (br_if $label$7 - (i64.ne - (tee_local $5 - (i64.add - (get_local $5) - (i64.const -5) - ) - ) - (i64.const -6) - ) - ) - ) - (call $eosio_assert - (i64.eq - (get_local $7) - (get_local $1) - ) - (i32.const 1920) - ) - ) - (block $label$13 - (block $label$14 - (br_if $label$14 - (i64.eq - (get_local $1) - (get_local $0) - ) - ) - (set_local $6 - (i64.const 0) - ) - (set_local $5 - (i64.const 59) - ) - (set_local $4 - (i32.const 1888) - ) - (set_local $7 - (i64.const 0) - ) - (loop $label$15 - (block $label$16 - (block $label$17 - (block $label$18 - (block $label$19 - (block $label$20 - (br_if $label$20 - (i64.gt_u - (get_local $6) - (i64.const 6) - ) - ) - (br_if $label$19 - (i32.gt_u - (i32.and - (i32.add - (tee_local $3 - (i32.load8_s - (get_local $4) - ) - ) - (i32.const -97) - ) - (i32.const 255) - ) - (i32.const 25) - ) - ) - (set_local $3 - (i32.add - (get_local $3) - (i32.const 165) - ) - ) - (br $label$18) - ) - (set_local $8 - (i64.const 0) - ) - (br_if $label$17 - (i64.le_u - (get_local $6) - (i64.const 11) - ) - ) - (br $label$16) - ) - (set_local $3 - (select - (i32.add - (get_local $3) - (i32.const 208) - ) - (i32.const 0) - (i32.lt_u - (i32.and - (i32.add - (get_local $3) - (i32.const -49) - ) - (i32.const 255) - ) - (i32.const 5) - ) - ) - ) - ) - (set_local $8 - (i64.shr_s - (i64.shl - (i64.extend_u/i32 - (get_local $3) - ) - (i64.const 56) - ) - (i64.const 56) - ) - ) - ) - (set_local $8 - (i64.shl - (i64.and - (get_local $8) - (i64.const 31) - ) - (i64.and - (get_local $5) - (i64.const 4294967295) - ) - ) - ) - ) - (set_local $4 - (i32.add - (get_local $4) - (i32.const 1) - ) - ) - (set_local $6 - (i64.add - (get_local $6) - (i64.const 1) - ) - ) - (set_local $7 - (i64.or - (get_local $8) - (get_local $7) - ) - ) - (br_if $label$15 - (i64.ne - (tee_local $5 - (i64.add - (get_local $5) - (i64.const -5) - ) - ) - (i64.const -6) - ) - ) - ) - (br_if $label$13 - (i64.ne - (get_local $7) - (get_local $2) - ) - ) - ) - (i64.store offset=104 - (get_local $9) - (get_local $0) - ) - (block $label$21 - (block $label$22 - (block $label$23 - (block $label$24 - (block $label$25 - (br_if $label$25 - (i64.gt_s - (get_local $2) - (i64.const 3849304916161986559) - ) - ) - (br_if $label$24 - (i64.eq - (get_local $2) - (i64.const -4993669930013425664) - ) - ) - (br_if $label$23 - (i64.eq - (get_local $2) - (i64.const -3617168760277827584) - ) - ) - (br_if $label$13 - (i64.ne - (get_local $2) - (i64.const -3617168760271673056) - ) - ) - (i32.store offset=68 - (get_local $9) - (i32.const 0) - ) - (i32.store offset=64 - (get_local $9) - (i32.const 1) - ) - (i64.store offset=40 align=4 - (get_local $9) - (i64.load offset=64 - (get_local $9) - ) - ) - (drop - (call $_ZN5eosio14execute_actionINS_5tokenES1_JyyyNS_5assetENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_E - (i32.add - (get_local $9) - (i32.const 104) - ) - (i32.add - (get_local $9) - (i32.const 40) - ) - ) - ) - (br $label$13) - ) - (br_if $label$22 - (i64.eq - (get_local $2) - (i64.const 3849304916161986560) - ) - ) - (br_if $label$21 - (i64.eq - (get_local $2) - (i64.const 8516769789752901632) - ) - ) - (br_if $label$13 - (i64.ne - (get_local $2) - (i64.const 5031766152489992192) - ) - ) - (i32.store offset=100 - (get_local $9) - (i32.const 0) - ) - (i32.store offset=96 - (get_local $9) - (i32.const 2) - ) - (i64.store offset=8 align=4 - (get_local $9) - (i64.load offset=96 - (get_local $9) - ) - ) - (drop - (call $_ZN5eosio14execute_actionINS_5tokenES1_JyNS_5assetEEEEbPT_MT0_FvDpT1_E - (i32.add - (get_local $9) - (i32.const 104) - ) - (i32.add - (get_local $9) - (i32.const 8) - ) - ) - ) - (br $label$13) - ) - (i32.store offset=60 - (get_local $9) - (i32.const 0) - ) - (i32.store offset=56 - (get_local $9) - (i32.const 3) - ) - (i64.store offset=48 align=4 - (get_local $9) - (i64.load offset=56 - (get_local $9) - ) - ) - (drop - (call $_ZN5eosio14execute_actionINS_5tokenES1_JNS_5assetENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_E - (i32.add - (get_local $9) - (i32.const 104) - ) - (i32.add - (get_local $9) - (i32.const 48) - ) - ) - ) - (br $label$13) - ) - (i32.store offset=84 - (get_local $9) - (i32.const 0) - ) - (i32.store offset=80 - (get_local $9) - (i32.const 4) - ) - (i64.store offset=24 align=4 - (get_local $9) - (i64.load offset=80 - (get_local $9) - ) - ) - (drop - (call $_ZN5eosio14execute_actionINS_5tokenES1_JyyNS_5assetENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_E - (i32.add - (get_local $9) - (i32.const 104) - ) - (i32.add - (get_local $9) - (i32.const 24) - ) - ) - ) - (br $label$13) - ) - (i32.store offset=76 - (get_local $9) - (i32.const 0) - ) - (i32.store offset=72 - (get_local $9) - (i32.const 5) - ) - (i64.store offset=32 align=4 - (get_local $9) - (i64.load offset=72 - (get_local $9) - ) - ) - (drop - (call $_ZN5eosio14execute_actionINS_5tokenES1_JyyNS_5assetENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_E - (i32.add - (get_local $9) - (i32.const 104) - ) - (i32.add - (get_local $9) - (i32.const 32) - ) - ) - ) - (br $label$13) - ) - (i32.store offset=92 - (get_local $9) - (i32.const 0) - ) - (i32.store offset=88 - (get_local $9) - (i32.const 6) - ) - (i64.store offset=16 align=4 - (get_local $9) - (i64.load offset=88 - (get_local $9) - ) - ) - (drop - (call $_ZN5eosio14execute_actionINS_5tokenES1_JyNS_5assetENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_E - (i32.add - (get_local $9) - (i32.const 104) - ) - (i32.add - (get_local $9) - (i32.const 16) - ) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $9) - (i32.const 112) - ) - ) - ) - (func $_ZN5eosio14execute_actionINS_5tokenES1_JyNS_5assetEEEEbPT_MT0_FvDpT1_E (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i64) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (set_local $9 - (tee_local $7 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 96) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (get_local $7) - ) - (set_local $2 - (i32.load offset=4 - (get_local $1) - ) - ) - (set_local $8 - (i32.load - (get_local $1) - ) - ) - (set_local $1 - (i32.const 0) - ) - (set_local $5 - (i32.const 0) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (tee_local $3 - (call $action_data_size) - ) - ) - ) - (block $label$1 - (block $label$2 - (br_if $label$2 - (i32.lt_u - (get_local $3) - (i32.const 513) - ) - ) - (set_local $5 - (call $malloc - (get_local $3) - ) - ) - (br $label$1) - ) - (i32.store offset=4 - (i32.const 0) - (tee_local $5 - (i32.sub - (get_local $7) - (i32.and - (i32.add - (get_local $3) - (i32.const 15) - ) - (i32.const -16) - ) - ) - ) - ) - ) - (drop - (call $read_action_data - (get_local $5) - (get_local $3) - ) - ) - ) - (i64.store - (i32.add - (get_local $9) - (i32.const 40) - ) - (i64.const 1398362884) - ) - (i64.store offset=32 - (get_local $9) - (i64.const 0) - ) - (i64.store offset=24 - (get_local $9) - (i64.const 0) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 288) - ) - (set_local $6 - (i64.const 5462355) - ) - (block $label$3 - (loop $label$4 - (set_local $7 - (i32.const 0) - ) - (br_if $label$3 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $6) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$5 - (br_if $label$5 - (i64.ne - (i64.and - (tee_local $6 - (i64.shr_u - (get_local $6) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$6 - (br_if $label$3 - (i64.ne - (i64.and - (tee_local $6 - (i64.shr_u - (get_local $6) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$6 - (i32.lt_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $7 - (i32.const 1) - ) - (br_if $label$4 - (i32.lt_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (call $eosio_assert - (get_local $7) - (i32.const 16) - ) - (call $eosio_assert - (i32.gt_u - (get_local $3) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $9) - (i32.const 24) - ) - (get_local $5) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.ne - (tee_local $7 - (i32.and - (get_local $3) - (i32.const -8) - ) - ) - (i32.const 8) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (tee_local $1 - (i32.add - (i32.add - (get_local $9) - (i32.const 24) - ) - (i32.const 8) - ) - ) - (i32.add - (get_local $5) - (i32.const 8) - ) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.ne - (get_local $7) - (i32.const 16) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (i32.add - (get_local $9) - (i32.const 24) - ) - (i32.const 16) - ) - (i32.add - (get_local $5) - (i32.const 16) - ) - (i32.const 8) - ) - ) - (block $label$7 - (br_if $label$7 - (i32.lt_u - (get_local $3) - (i32.const 513) - ) - ) - (call $free - (get_local $5) - ) - ) - (i64.store - (tee_local $7 - (i32.add - (i32.add - (get_local $9) - (i32.const 48) - ) - (i32.const 8) - ) - ) - (i64.load - (i32.add - (get_local $1) - (i32.const 8) - ) - ) - ) - (set_local $6 - (i64.load offset=24 - (get_local $9) - ) - ) - (i64.store offset=48 - (get_local $9) - (i64.load - (get_local $1) - ) - ) - (i64.store - (i32.add - (i32.add - (get_local $9) - (i32.const 64) - ) - (i32.const 8) - ) - (i64.load - (get_local $7) - ) - ) - (i64.store offset=64 - (get_local $9) - (i64.load offset=48 - (get_local $9) - ) - ) - (set_local $1 - (i32.add - (get_local $0) - (i32.shr_s - (get_local $2) - (i32.const 1) - ) - ) - ) - (block $label$8 - (br_if $label$8 - (i32.eqz - (i32.and - (get_local $2) - (i32.const 1) - ) - ) - ) - (set_local $8 - (i32.load - (i32.add - (i32.load - (get_local $1) - ) - (get_local $8) - ) - ) - ) - ) - (i64.store - (i32.add - (i32.add - (get_local $9) - (i32.const 80) - ) - (i32.const 8) - ) - (tee_local $4 - (i64.load - (i32.add - (i32.add - (get_local $9) - (i32.const 64) - ) - (i32.const 8) - ) - ) - ) - ) - (i64.store - (i32.add - (i32.add - (get_local $9) - (i32.const 8) - ) - (i32.const 8) - ) - (get_local $4) - ) - (i64.store offset=80 - (get_local $9) - (tee_local $4 - (i64.load offset=64 - (get_local $9) - ) - ) - ) - (i64.store offset=8 - (get_local $9) - (get_local $4) - ) - (call_indirect (type $FUNCSIG$viji) - (get_local $1) - (get_local $6) - (i32.add - (get_local $9) - (i32.const 8) - ) - (get_local $8) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $9) - (i32.const 96) - ) - ) - (i32.const 1) - ) - (func $_ZN5eosio14execute_actionINS_5tokenES1_JyNS_5assetENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_E (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $4 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 80) - ) - ) - ) - (i32.store offset=60 - (tee_local $5 - (get_local $4) - ) - (get_local $0) - ) - (i32.store offset=48 - (get_local $5) - (i32.load - (get_local $1) - ) - ) - (i32.store offset=52 - (get_local $5) - (i32.load offset=4 - (get_local $1) - ) - ) - (set_local $1 - (i32.const 0) - ) - (set_local $0 - (i32.const 0) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (tee_local $2 - (call $action_data_size) - ) - ) - ) - (block $label$1 - (block $label$2 - (br_if $label$2 - (i32.lt_u - (get_local $2) - (i32.const 513) - ) - ) - (set_local $0 - (call $malloc - (get_local $2) - ) - ) - (br $label$1) - ) - (i32.store offset=4 - (i32.const 0) - (tee_local $0 - (i32.sub - (get_local $4) - (i32.and - (i32.add - (get_local $2) - (i32.const 15) - ) - (i32.const -16) - ) - ) - ) - ) - ) - (drop - (call $read_action_data - (get_local $0) - (get_local $2) - ) - ) - ) - (i64.store - (i32.add - (get_local $5) - (i32.const 24) - ) - (i64.const 1398362884) - ) - (i64.store offset=16 - (get_local $5) - (i64.const 0) - ) - (i64.store offset=8 - (get_local $5) - (i64.const 0) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 288) - ) - (set_local $3 - (i64.const 5462355) - ) - (block $label$3 - (block $label$4 - (loop $label$5 - (br_if $label$4 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $3) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$6 - (br_if $label$6 - (i64.ne - (i64.and - (tee_local $3 - (i64.shr_u - (get_local $3) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$7 - (br_if $label$4 - (i64.ne - (i64.and - (tee_local $3 - (i64.shr_u - (get_local $3) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$7 - (i32.lt_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $4 - (i32.const 1) - ) - (br_if $label$5 - (i32.lt_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$3) - ) - ) - (set_local $4 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $4) - (i32.const 16) - ) - (i32.store - (i32.add - (get_local $5) - (i32.const 40) - ) - (i32.const 0) - ) - (i64.store offset=32 - (get_local $5) - (i64.const 0) - ) - (i32.store offset=64 - (get_local $5) - (get_local $0) - ) - (i32.store offset=72 - (get_local $5) - (tee_local $1 - (i32.add - (get_local $0) - (get_local $2) - ) - ) - ) - (call $eosio_assert - (i32.gt_u - (get_local $2) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $5) - (i32.const 8) - ) - (get_local $0) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (get_local $1) - (tee_local $4 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (i32.add - (get_local $5) - (i32.const 8) - ) - (i32.const 8) - ) - (get_local $4) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (get_local $1) - (tee_local $4 - (i32.add - (get_local $0) - (i32.const 16) - ) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (i32.add - (get_local $5) - (i32.const 8) - ) - (i32.const 16) - ) - (get_local $4) - (i32.const 8) - ) - ) - (i32.store offset=68 - (get_local $5) - (i32.add - (get_local $0) - (i32.const 24) - ) - ) - (drop - (call $_ZN5eosiorsINS_10datastreamIPKcEEEERT_S6_RNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE - (i32.add - (get_local $5) - (i32.const 64) - ) - (i32.add - (i32.add - (get_local $5) - (i32.const 8) - ) - (i32.const 24) - ) - ) - ) - (block $label$8 - (br_if $label$8 - (i32.lt_u - (get_local $2) - (i32.const 513) - ) - ) - (call $free - (get_local $0) - ) - ) - (i32.store offset=68 - (get_local $5) - (i32.add - (get_local $5) - (i32.const 48) - ) - ) - (i32.store offset=64 - (get_local $5) - (i32.add - (get_local $5) - (i32.const 60) - ) - ) - (call $_ZN5boost4mp116detail16tuple_apply_implIRZN5eosio14execute_actionINS3_5tokenES5_JyNS3_5assetENSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_EEUlDpT_E_RNS7_5tupleIJyS6_SD_EEEJLj0ELj1ELj2EEEEDTclclsr3stdE7forwardISE_Efp_Espclsr3stdE3getIXT1_EEclsr3stdE7forwardISG_Efp0_EEEEOSE_OSG_NS0_16integer_sequenceIjJXspT1_EEEE - (i32.add - (get_local $5) - (i32.const 64) - ) - (i32.add - (get_local $5) - (i32.const 8) - ) - ) - (block $label$9 - (br_if $label$9 - (i32.eqz - (i32.and - (i32.load8_u offset=32 - (get_local $5) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load - (i32.add - (get_local $5) - (i32.const 40) - ) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $5) - (i32.const 80) - ) - ) - (i32.const 1) - ) - (func $_ZN5eosio14execute_actionINS_5tokenES1_JyyNS_5assetENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_E (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $4 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 96) - ) - ) - ) - (i32.store offset=60 - (tee_local $5 - (get_local $4) - ) - (get_local $0) - ) - (i32.store offset=48 - (get_local $5) - (i32.load - (get_local $1) - ) - ) - (i32.store offset=52 - (get_local $5) - (i32.load offset=4 - (get_local $1) - ) - ) - (set_local $1 - (i32.const 0) - ) - (set_local $0 - (i32.const 0) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (tee_local $2 - (call $action_data_size) - ) - ) - ) - (block $label$1 - (block $label$2 - (br_if $label$2 - (i32.lt_u - (get_local $2) - (i32.const 513) - ) - ) - (set_local $0 - (call $malloc - (get_local $2) - ) - ) - (br $label$1) - ) - (i32.store offset=4 - (i32.const 0) - (tee_local $0 - (i32.sub - (get_local $4) - (i32.and - (i32.add - (get_local $2) - (i32.const 15) - ) - (i32.const -16) - ) - ) - ) - ) - ) - (drop - (call $read_action_data - (get_local $0) - (get_local $2) - ) - ) - ) - (i64.store - (i32.add - (get_local $5) - (i32.const 24) - ) - (i64.const 1398362884) - ) - (i64.store offset=8 - (get_local $5) - (i64.const 0) - ) - (i64.store - (get_local $5) - (i64.const 0) - ) - (i64.store offset=16 - (get_local $5) - (i64.const 0) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 288) - ) - (set_local $3 - (i64.const 5462355) - ) - (block $label$3 - (block $label$4 - (loop $label$5 - (br_if $label$4 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $3) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$6 - (br_if $label$6 - (i64.ne - (i64.and - (tee_local $3 - (i64.shr_u - (get_local $3) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$7 - (br_if $label$4 - (i64.ne - (i64.and - (tee_local $3 - (i64.shr_u - (get_local $3) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$7 - (i32.lt_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $4 - (i32.const 1) - ) - (br_if $label$5 - (i32.lt_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$3) - ) - ) - (set_local $4 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $4) - (i32.const 16) - ) - (i32.store - (i32.add - (get_local $5) - (i32.const 40) - ) - (i32.const 0) - ) - (i64.store offset=32 - (get_local $5) - (i64.const 0) - ) - (i32.store offset=68 - (get_local $5) - (get_local $0) - ) - (i32.store offset=64 - (get_local $5) - (get_local $0) - ) - (i32.store offset=72 - (get_local $5) - (i32.add - (get_local $0) - (get_local $2) - ) - ) - (i32.store offset=80 - (get_local $5) - (i32.add - (get_local $5) - (i32.const 64) - ) - ) - (i32.store offset=88 - (get_local $5) - (get_local $5) - ) - (call $_ZN5boost6fusion6detail17for_each_unrolledILi4EE4callINS0_18std_tuple_iteratorINSt3__15tupleIJyyN5eosio5assetENS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEEEELi0EEEZNS8_rsINS8_10datastreamIPKcEEJyyS9_SF_EEERT_SO_RNS7_IJDpT0_EEEEUlSO_E_EEvRKSN_RKT0_ - (i32.add - (get_local $5) - (i32.const 88) - ) - (i32.add - (get_local $5) - (i32.const 80) - ) - ) - (block $label$8 - (br_if $label$8 - (i32.lt_u - (get_local $2) - (i32.const 513) - ) - ) - (call $free - (get_local $0) - ) - ) - (i32.store offset=68 - (get_local $5) - (i32.add - (get_local $5) - (i32.const 48) - ) - ) - (i32.store offset=64 - (get_local $5) - (i32.add - (get_local $5) - (i32.const 60) - ) - ) - (call $_ZN5boost4mp116detail16tuple_apply_implIRZN5eosio14execute_actionINS3_5tokenES5_JyyNS3_5assetENSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_EEUlDpT_E_RNS7_5tupleIJyyS6_SD_EEEJLj0ELj1ELj2ELj3EEEEDTclclsr3stdE7forwardISE_Efp_Espclsr3stdE3getIXT1_EEclsr3stdE7forwardISG_Efp0_EEEEOSE_OSG_NS0_16integer_sequenceIjJXspT1_EEEE - (i32.add - (get_local $5) - (i32.const 64) - ) - (get_local $5) - ) - (block $label$9 - (br_if $label$9 - (i32.eqz - (i32.and - (i32.load8_u offset=32 - (get_local $5) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load - (i32.add - (get_local $5) - (i32.const 40) - ) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $5) - (i32.const 96) - ) - ) - (i32.const 1) - ) - (func $_ZN5eosio14execute_actionINS_5tokenES1_JyyyNS_5assetENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_E (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $4 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 112) - ) - ) - ) - (i32.store offset=76 - (tee_local $5 - (get_local $4) - ) - (get_local $0) - ) - (i32.store offset=64 - (get_local $5) - (i32.load - (get_local $1) - ) - ) - (i32.store offset=68 - (get_local $5) - (i32.load offset=4 - (get_local $1) - ) - ) - (set_local $1 - (i32.const 0) - ) - (set_local $0 - (i32.const 0) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (tee_local $2 - (call $action_data_size) - ) - ) - ) - (block $label$1 - (block $label$2 - (br_if $label$2 - (i32.lt_u - (get_local $2) - (i32.const 513) - ) - ) - (set_local $0 - (call $malloc - (get_local $2) - ) - ) - (br $label$1) - ) - (i32.store offset=4 - (i32.const 0) - (tee_local $0 - (i32.sub - (get_local $4) - (i32.and - (i32.add - (get_local $2) - (i32.const 15) - ) - (i32.const -16) - ) - ) - ) - ) - ) - (drop - (call $read_action_data - (get_local $0) - (get_local $2) - ) - ) - ) - (i64.store - (i32.add - (get_local $5) - (i32.const 40) - ) - (i64.const 1398362884) - ) - (i64.store offset=16 - (get_local $5) - (i64.const 0) - ) - (i64.store offset=8 - (get_local $5) - (i64.const 0) - ) - (i64.store offset=24 - (get_local $5) - (i64.const 0) - ) - (i64.store offset=32 - (get_local $5) - (i64.const 0) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 288) - ) - (set_local $3 - (i64.const 5462355) - ) - (block $label$3 - (block $label$4 - (loop $label$5 - (br_if $label$4 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $3) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$6 - (br_if $label$6 - (i64.ne - (i64.and - (tee_local $3 - (i64.shr_u - (get_local $3) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$7 - (br_if $label$4 - (i64.ne - (i64.and - (tee_local $3 - (i64.shr_u - (get_local $3) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$7 - (i32.lt_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $4 - (i32.const 1) - ) - (br_if $label$5 - (i32.lt_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$3) - ) - ) - (set_local $4 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $4) - (i32.const 16) - ) - (i32.store - (i32.add - (get_local $5) - (i32.const 56) - ) - (i32.const 0) - ) - (i64.store offset=48 - (get_local $5) - (i64.const 0) - ) - (i32.store offset=84 - (get_local $5) - (get_local $0) - ) - (i32.store offset=80 - (get_local $5) - (get_local $0) - ) - (i32.store offset=88 - (get_local $5) - (i32.add - (get_local $0) - (get_local $2) - ) - ) - (i32.store offset=96 - (get_local $5) - (i32.add - (get_local $5) - (i32.const 80) - ) - ) - (i32.store offset=104 - (get_local $5) - (i32.add - (get_local $5) - (i32.const 8) - ) - ) - (call $_ZN5boost6fusion6detail17for_each_unrolledILi5EE4callINS0_18std_tuple_iteratorINSt3__15tupleIJyyyN5eosio5assetENS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEEEELi0EEEZNS8_rsINS8_10datastreamIPKcEEJyyyS9_SF_EEERT_SO_RNS7_IJDpT0_EEEEUlSO_E_EEvRKSN_RKT0_ - (i32.add - (get_local $5) - (i32.const 104) - ) - (i32.add - (get_local $5) - (i32.const 96) - ) - ) - (block $label$8 - (br_if $label$8 - (i32.lt_u - (get_local $2) - (i32.const 513) - ) - ) - (call $free - (get_local $0) - ) - ) - (i32.store offset=84 - (get_local $5) - (i32.add - (get_local $5) - (i32.const 64) - ) - ) - (i32.store offset=80 - (get_local $5) - (i32.add - (get_local $5) - (i32.const 76) - ) - ) - (call $_ZN5boost4mp116detail16tuple_apply_implIRZN5eosio14execute_actionINS3_5tokenES5_JyyyNS3_5assetENSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_EEUlDpT_E_RNS7_5tupleIJyyyS6_SD_EEEJLj0ELj1ELj2ELj3ELj4EEEEDTclclsr3stdE7forwardISE_Efp_Espclsr3stdE3getIXT1_EEclsr3stdE7forwardISG_Efp0_EEEEOSE_OSG_NS0_16integer_sequenceIjJXspT1_EEEE - (i32.add - (get_local $5) - (i32.const 80) - ) - (i32.add - (get_local $5) - (i32.const 8) - ) - ) - (block $label$9 - (br_if $label$9 - (i32.eqz - (i32.and - (i32.load8_u offset=48 - (get_local $5) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load - (i32.add - (get_local $5) - (i32.const 56) - ) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $5) - (i32.const 112) - ) - ) - (i32.const 1) - ) - (func $_ZN5eosio14execute_actionINS_5tokenES1_JNS_5assetENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_E (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $4 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 64) - ) - ) - ) - (i32.store offset=44 - (tee_local $5 - (get_local $4) - ) - (get_local $0) - ) - (i32.store offset=32 - (get_local $5) - (i32.load - (get_local $1) - ) - ) - (i32.store offset=36 - (get_local $5) - (i32.load offset=4 - (get_local $1) - ) - ) - (set_local $1 - (i32.const 0) - ) - (set_local $0 - (i32.const 0) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (tee_local $2 - (call $action_data_size) - ) - ) - ) - (block $label$1 - (block $label$2 - (br_if $label$2 - (i32.lt_u - (get_local $2) - (i32.const 513) - ) - ) - (set_local $0 - (call $malloc - (get_local $2) - ) - ) - (br $label$1) - ) - (i32.store offset=4 - (i32.const 0) - (tee_local $0 - (i32.sub - (get_local $4) - (i32.and - (i32.add - (get_local $2) - (i32.const 15) - ) - (i32.const -16) - ) - ) - ) - ) - ) - (drop - (call $read_action_data - (get_local $0) - (get_local $2) - ) - ) - ) - (i64.store offset=8 - (get_local $5) - (i64.const 1398362884) - ) - (i64.store - (get_local $5) - (i64.const 0) - ) - (call $eosio_assert - (i32.const 1) - (i32.const 288) - ) - (set_local $3 - (i64.const 5462355) - ) - (block $label$3 - (block $label$4 - (loop $label$5 - (br_if $label$4 - (i32.gt_u - (i32.add - (i32.shl - (i32.wrap/i64 - (get_local $3) - ) - (i32.const 24) - ) - (i32.const -1073741825) - ) - (i32.const 452984830) - ) - ) - (block $label$6 - (br_if $label$6 - (i64.ne - (i64.and - (tee_local $3 - (i64.shr_u - (get_local $3) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (loop $label$7 - (br_if $label$4 - (i64.ne - (i64.and - (tee_local $3 - (i64.shr_u - (get_local $3) - (i64.const 8) - ) - ) - (i64.const 255) - ) - (i64.const 0) - ) - ) - (br_if $label$7 - (i32.lt_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - ) - ) - (set_local $4 - (i32.const 1) - ) - (br_if $label$5 - (i32.lt_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 7) - ) - ) - (br $label$3) - ) - ) - (set_local $4 - (i32.const 0) - ) - ) - (call $eosio_assert - (get_local $4) - (i32.const 16) - ) - (i32.store - (i32.add - (get_local $5) - (i32.const 24) - ) - (i32.const 0) - ) - (i64.store offset=16 - (get_local $5) - (i64.const 0) - ) - (i32.store offset=48 - (get_local $5) - (get_local $0) - ) - (i32.store offset=56 - (get_local $5) - (tee_local $1 - (i32.add - (get_local $0) - (get_local $2) - ) - ) - ) - (call $eosio_assert - (i32.gt_u - (get_local $2) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $5) - (get_local $0) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (get_local $1) - (tee_local $4 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $5) - (i32.const 8) - ) - (get_local $4) - (i32.const 8) - ) - ) - (i32.store offset=52 - (get_local $5) - (i32.add - (get_local $0) - (i32.const 16) - ) - ) - (drop - (call $_ZN5eosiorsINS_10datastreamIPKcEEEERT_S6_RNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE - (i32.add - (get_local $5) - (i32.const 48) - ) - (i32.add - (get_local $5) - (i32.const 16) - ) - ) - ) - (block $label$8 - (br_if $label$8 - (i32.lt_u - (get_local $2) - (i32.const 513) - ) - ) - (call $free - (get_local $0) - ) - ) - (i32.store offset=52 - (get_local $5) - (i32.add - (get_local $5) - (i32.const 32) - ) - ) - (i32.store offset=48 - (get_local $5) - (i32.add - (get_local $5) - (i32.const 44) - ) - ) - (call $_ZN5boost4mp116detail16tuple_apply_implIRZN5eosio14execute_actionINS3_5tokenES5_JNS3_5assetENSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_EEUlDpT_E_RNS7_5tupleIJS6_SD_EEEJLj0ELj1EEEEDTclclsr3stdE7forwardISE_Efp_Espclsr3stdE3getIXT1_EEclsr3stdE7forwardISG_Efp0_EEEEOSE_OSG_NS0_16integer_sequenceIjJXspT1_EEEE - (i32.add - (get_local $5) - (i32.const 48) - ) - (get_local $5) - ) - (block $label$9 - (br_if $label$9 - (i32.eqz - (i32.and - (i32.load8_u offset=16 - (get_local $5) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load - (i32.add - (get_local $5) - (i32.const 24) - ) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $5) - (i32.const 64) - ) - ) - (i32.const 1) - ) - (func $_ZN5eosiorsINS_10datastreamIPKcEEEERT_S6_RNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $7 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 32) - ) - ) - ) - (i32.store offset=24 - (get_local $7) - (i32.const 0) - ) - (i64.store offset=16 - (get_local $7) - (i64.const 0) - ) - (drop - (call $_ZN5eosiorsINS_10datastreamIPKcEEEERT_S6_RNSt3__16vectorIcNS7_9allocatorIcEEEE - (get_local $0) - (i32.add - (get_local $7) - (i32.const 16) - ) - ) - ) - (block $label$0 - (block $label$1 - (block $label$2 - (block $label$3 - (block $label$4 - (block $label$5 - (block $label$6 - (block $label$7 - (block $label$8 - (br_if $label$8 - (i32.ne - (tee_local $5 - (i32.load offset=20 - (get_local $7) - ) - ) - (tee_local $4 - (i32.load offset=16 - (get_local $7) - ) - ) - ) - ) - (br_if $label$7 - (i32.and - (i32.load8_u - (get_local $1) - ) - (i32.const 1) - ) - ) - (i32.store16 - (get_local $1) - (i32.const 0) - ) - (set_local $4 - (i32.add - (get_local $1) - (i32.const 8) - ) - ) - (br $label$6) - ) - (i32.store - (i32.add - (get_local $7) - (i32.const 8) - ) - (i32.const 0) - ) - (i64.store - (get_local $7) - (i64.const 0) - ) - (br_if $label$0 - (i32.ge_u - (tee_local $2 - (i32.sub - (get_local $5) - (get_local $4) - ) - ) - (i32.const -16) - ) - ) - (br_if $label$5 - (i32.ge_u - (get_local $2) - (i32.const 11) - ) - ) - (i32.store8 - (get_local $7) - (i32.shl - (get_local $2) - (i32.const 1) - ) - ) - (set_local $6 - (i32.or - (get_local $7) - (i32.const 1) - ) - ) - (br_if $label$4 - (get_local $2) - ) - (br $label$3) - ) - (i32.store8 - (i32.load offset=8 - (get_local $1) - ) - (i32.const 0) - ) - (i32.store offset=4 - (get_local $1) - (i32.const 0) - ) - (set_local $4 - (i32.add - (get_local $1) - (i32.const 8) - ) - ) - ) - (call $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEj - (get_local $1) - (i32.const 0) - ) - (i32.store - (get_local $4) - (i32.const 0) - ) - (i64.store align=4 - (get_local $1) - (i64.const 0) - ) - (br_if $label$2 - (tee_local $4 - (i32.load offset=16 - (get_local $7) - ) - ) - ) - (br $label$1) - ) - (set_local $6 - (call $_Znwj - (tee_local $5 - (i32.and - (i32.add - (get_local $2) - (i32.const 16) - ) - (i32.const -16) - ) - ) - ) - ) - (i32.store - (get_local $7) - (i32.or - (get_local $5) - (i32.const 1) - ) - ) - (i32.store offset=8 - (get_local $7) - (get_local $6) - ) - (i32.store offset=4 - (get_local $7) - (get_local $2) - ) - ) - (set_local $3 - (get_local $2) - ) - (set_local $5 - (get_local $6) - ) - (loop $label$9 - (i32.store8 - (get_local $5) - (i32.load8_u - (get_local $4) - ) - ) - (set_local $5 - (i32.add - (get_local $5) - (i32.const 1) - ) - ) - (set_local $4 - (i32.add - (get_local $4) - (i32.const 1) - ) - ) - (br_if $label$9 - (tee_local $3 - (i32.add - (get_local $3) - (i32.const -1) - ) - ) - ) - ) - (set_local $6 - (i32.add - (get_local $6) - (get_local $2) - ) - ) - ) - (i32.store8 - (get_local $6) - (i32.const 0) - ) - (block $label$10 - (block $label$11 - (br_if $label$11 - (i32.and - (i32.load8_u - (get_local $1) - ) - (i32.const 1) - ) - ) - (i32.store16 - (get_local $1) - (i32.const 0) - ) - (br $label$10) - ) - (i32.store8 - (i32.load offset=8 - (get_local $1) - ) - (i32.const 0) - ) - (i32.store offset=4 - (get_local $1) - (i32.const 0) - ) - ) - (call $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEj - (get_local $1) - (i32.const 0) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const 8) - ) - (i32.load - (i32.add - (get_local $7) - (i32.const 8) - ) - ) - ) - (i64.store align=4 - (get_local $1) - (i64.load - (get_local $7) - ) - ) - (br_if $label$1 - (i32.eqz - (tee_local $4 - (i32.load offset=16 - (get_local $7) - ) - ) - ) - ) - ) - (i32.store offset=20 - (get_local $7) - (get_local $4) - ) - (call $_ZdlPv - (get_local $4) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $7) - (i32.const 32) - ) - ) - (return - (get_local $0) - ) - ) - (call $_ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv - (get_local $7) - ) - (unreachable) - ) - (func $_ZN5boost4mp116detail16tuple_apply_implIRZN5eosio14execute_actionINS3_5tokenES5_JNS3_5assetENSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_EEUlDpT_E_RNS7_5tupleIJS6_SD_EEEJLj0ELj1EEEEDTclclsr3stdE7forwardISE_Efp_Espclsr3stdE3getIXT1_EEclsr3stdE7forwardISG_Efp0_EEEEOSE_OSG_NS0_16integer_sequenceIjJXspT1_EEEE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $3 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 96) - ) - ) - ) - (i64.store - (tee_local $2 - (i32.add - (i32.add - (get_local $3) - (i32.const 32) - ) - (i32.const 8) - ) - ) - (i64.load - (i32.add - (get_local $1) - (i32.const 8) - ) - ) - ) - (i64.store offset=32 - (get_local $3) - (i64.load - (get_local $1) - ) - ) - (drop - (call $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_ - (i32.add - (get_local $3) - (i32.const 16) - ) - (i32.add - (get_local $1) - (i32.const 16) - ) - ) - ) - (i64.store - (i32.add - (i32.add - (get_local $3) - (i32.const 48) - ) - (i32.const 8) - ) - (i64.load - (get_local $2) - ) - ) - (i64.store offset=48 - (get_local $3) - (i64.load offset=32 - (get_local $3) - ) - ) - (set_local $0 - (i32.add - (i32.load - (i32.load - (get_local $0) - ) - ) - (i32.shr_s - (tee_local $2 - (i32.load offset=4 - (tee_local $1 - (i32.load offset=4 - (get_local $0) - ) - ) - ) - ) - (i32.const 1) - ) - ) - ) - (set_local $1 - (i32.load - (get_local $1) - ) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (i32.and - (get_local $2) - (i32.const 1) - ) - ) - ) - (set_local $1 - (i32.load - (i32.add - (i32.load - (get_local $0) - ) - (get_local $1) - ) - ) - ) - ) - (i64.store - (tee_local $2 - (i32.add - (i32.add - (get_local $3) - (i32.const 80) - ) - (i32.const 8) - ) - ) - (i64.load - (i32.add - (i32.add - (get_local $3) - (i32.const 48) - ) - (i32.const 8) - ) - ) - ) - (i64.store offset=80 - (get_local $3) - (i64.load offset=48 - (get_local $3) - ) - ) - (drop - (call $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_ - (i32.add - (get_local $3) - (i32.const 64) - ) - (i32.add - (get_local $3) - (i32.const 16) - ) - ) - ) - (i64.store - (i32.add - (get_local $3) - (i32.const 8) - ) - (i64.load - (get_local $2) - ) - ) - (i64.store - (get_local $3) - (i64.load offset=80 - (get_local $3) - ) - ) - (call_indirect (type $FUNCSIG$viii) - (get_local $0) - (get_local $3) - (i32.add - (get_local $3) - (i32.const 64) - ) - (get_local $1) - ) - (block $label$1 - (br_if $label$1 - (i32.eqz - (i32.and - (i32.load8_u offset=64 - (get_local $3) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load offset=72 - (get_local $3) - ) - ) - ) - (block $label$2 - (br_if $label$2 - (i32.eqz - (i32.and - (i32.load8_u offset=16 - (get_local $3) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load offset=24 - (get_local $3) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $3) - (i32.const 96) - ) - ) - ) - (func $_ZN5eosiorsINS_10datastreamIPKcEEEERT_S6_RNSt3__16vectorIcNS7_9allocatorIcEEEE (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i32) - (set_local $5 - (i32.load offset=4 - (get_local $0) - ) - ) - (set_local $7 - (i32.const 0) - ) - (set_local $6 - (i64.const 0) - ) - (set_local $2 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (set_local $3 - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - (loop $label$0 - (call $eosio_assert - (i32.lt_u - (get_local $5) - (i32.load - (get_local $2) - ) - ) - (i32.const 1984) - ) - (set_local $4 - (i32.load8_u - (tee_local $5 - (i32.load - (get_local $3) - ) - ) - ) - ) - (i32.store - (get_local $3) - (tee_local $5 - (i32.add - (get_local $5) - (i32.const 1) - ) - ) - ) - (set_local $6 - (i64.or - (i64.extend_u/i32 - (i32.shl - (i32.and - (get_local $4) - (i32.const 127) - ) - (tee_local $7 - (i32.and - (get_local $7) - (i32.const 255) - ) - ) - ) - ) - (get_local $6) - ) - ) - (set_local $7 - (i32.add - (get_local $7) - (i32.const 7) - ) - ) - (br_if $label$0 - (i32.shr_u - (get_local $4) - (i32.const 7) - ) - ) - ) - (block $label$1 - (block $label$2 - (br_if $label$2 - (i32.le_u - (tee_local $3 - (i32.wrap/i64 - (get_local $6) - ) - ) - (tee_local $2 - (i32.sub - (tee_local $7 - (i32.load offset=4 - (get_local $1) - ) - ) - (tee_local $4 - (i32.load - (get_local $1) - ) - ) - ) - ) - ) - ) - (call $_ZNSt3__16vectorIcNS_9allocatorIcEEE8__appendEj - (get_local $1) - (i32.sub - (get_local $3) - (get_local $2) - ) - ) - (set_local $5 - (i32.load - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (set_local $7 - (i32.load - (i32.add - (get_local $1) - (i32.const 4) - ) - ) - ) - (set_local $4 - (i32.load - (get_local $1) - ) - ) - (br $label$1) - ) - (br_if $label$1 - (i32.ge_u - (get_local $3) - (get_local $2) - ) - ) - (i32.store - (i32.add - (get_local $1) - (i32.const 4) - ) - (tee_local $7 - (i32.add - (get_local $4) - (get_local $3) - ) - ) - ) - ) - (call $eosio_assert - (i32.ge_u - (i32.sub - (i32.load - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (get_local $5) - ) - (tee_local $5 - (i32.sub - (get_local $7) - (get_local $4) - ) - ) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $4) - (i32.load - (tee_local $7 - (i32.add - (get_local $0) - (i32.const 4) - ) - ) - ) - (get_local $5) - ) - ) - (i32.store - (get_local $7) - (i32.add - (i32.load - (get_local $7) - ) - (get_local $5) - ) - ) - (get_local $0) - ) - (func $_ZN5boost6fusion6detail17for_each_unrolledILi5EE4callINS0_18std_tuple_iteratorINSt3__15tupleIJyyyN5eosio5assetENS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEEEELi0EEEZNS8_rsINS8_10datastreamIPKcEEJyyyS9_SF_EEERT_SO_RNS7_IJDpT0_EEEEUlSO_E_EEvRKSN_RKT0_ (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (set_local $2 - (i32.load - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (tee_local $3 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $3) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $2) - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (set_local $0 - (i32.load - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (tee_local $3 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $3) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $0) - (i32.const 8) - ) - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (tee_local $3 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $3) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $0) - (i32.const 16) - ) - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (tee_local $3 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $3) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $0) - (i32.const 24) - ) - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (tee_local $2 - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (get_local $3) - ) - (get_local $2) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $0) - (i32.const 32) - ) - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (drop - (call $_ZN5eosiorsINS_10datastreamIPKcEEEERT_S6_RNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE - (i32.load - (get_local $1) - ) - (i32.add - (get_local $0) - (i32.const 40) - ) - ) - ) - ) - (func $_ZN5boost4mp116detail16tuple_apply_implIRZN5eosio14execute_actionINS3_5tokenES5_JyyyNS3_5assetENSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_EEUlDpT_E_RNS7_5tupleIJyyyS6_SD_EEEJLj0ELj1ELj2ELj3ELj4EEEEDTclclsr3stdE7forwardISE_Efp_Espclsr3stdE3getIXT1_EEclsr3stdE7forwardISG_Efp0_EEEEOSE_OSG_NS0_16integer_sequenceIjJXspT1_EEEE (param $0 i32) (param $1 i32) - (local $2 i64) - (local $3 i64) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $6 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 96) - ) - ) - ) - (i32.store - (i32.add - (get_local $6) - (i32.const 44) - ) - (i32.load - (i32.add - (get_local $1) - (i32.const 36) - ) - ) - ) - (i32.store - (tee_local $5 - (i32.add - (i32.add - (get_local $6) - (i32.const 32) - ) - (i32.const 8) - ) - ) - (i32.load - (i32.add - (get_local $1) - (i32.const 32) - ) - ) - ) - (i32.store offset=32 - (get_local $6) - (i32.load offset=24 - (get_local $1) - ) - ) - (i32.store offset=36 - (get_local $6) - (i32.load - (i32.add - (get_local $1) - (i32.const 28) - ) - ) - ) - (set_local $4 - (i64.load offset=16 - (get_local $1) - ) - ) - (set_local $3 - (i64.load offset=8 - (get_local $1) - ) - ) - (set_local $2 - (i64.load - (get_local $1) - ) - ) - (drop - (call $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_ - (i32.add - (get_local $6) - (i32.const 16) - ) - (i32.add - (get_local $1) - (i32.const 40) - ) - ) - ) - (i64.store - (i32.add - (i32.add - (get_local $6) - (i32.const 48) - ) - (i32.const 8) - ) - (i64.load - (get_local $5) - ) - ) - (i64.store offset=48 - (get_local $6) - (i64.load offset=32 - (get_local $6) - ) - ) - (set_local $0 - (i32.add - (i32.load - (i32.load - (get_local $0) - ) - ) - (i32.shr_s - (tee_local $5 - (i32.load offset=4 - (tee_local $1 - (i32.load offset=4 - (get_local $0) - ) - ) - ) - ) - (i32.const 1) - ) - ) - ) - (set_local $1 - (i32.load - (get_local $1) - ) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (i32.and - (get_local $5) - (i32.const 1) - ) - ) - ) - (set_local $1 - (i32.load - (i32.add - (i32.load - (get_local $0) - ) - (get_local $1) - ) - ) - ) - ) - (i64.store - (tee_local $5 - (i32.add - (i32.add - (get_local $6) - (i32.const 80) - ) - (i32.const 8) - ) - ) - (i64.load - (i32.add - (i32.add - (get_local $6) - (i32.const 48) - ) - (i32.const 8) - ) - ) - ) - (i64.store offset=80 - (get_local $6) - (i64.load offset=48 - (get_local $6) - ) - ) - (drop - (call $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_ - (i32.add - (get_local $6) - (i32.const 64) - ) - (i32.add - (get_local $6) - (i32.const 16) - ) - ) - ) - (i64.store - (i32.add - (get_local $6) - (i32.const 8) - ) - (i64.load - (get_local $5) - ) - ) - (i64.store - (get_local $6) - (i64.load offset=80 - (get_local $6) - ) - ) - (call_indirect (type $FUNCSIG$vijjjii) - (get_local $0) - (get_local $2) - (get_local $3) - (get_local $4) - (get_local $6) - (i32.add - (get_local $6) - (i32.const 64) - ) - (get_local $1) - ) - (block $label$1 - (br_if $label$1 - (i32.eqz - (i32.and - (i32.load8_u offset=64 - (get_local $6) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load offset=72 - (get_local $6) - ) - ) - ) - (block $label$2 - (br_if $label$2 - (i32.eqz - (i32.and - (i32.load8_u offset=16 - (get_local $6) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load offset=24 - (get_local $6) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $6) - (i32.const 96) - ) - ) - ) - (func $_ZN5boost6fusion6detail17for_each_unrolledILi4EE4callINS0_18std_tuple_iteratorINSt3__15tupleIJyyN5eosio5assetENS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEEEELi0EEEZNS8_rsINS8_10datastreamIPKcEEJyyS9_SF_EEERT_SO_RNS7_IJDpT0_EEEEUlSO_E_EEvRKSN_RKT0_ (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (set_local $2 - (i32.load - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (tee_local $3 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $3) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (get_local $2) - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (set_local $0 - (i32.load - (get_local $0) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (tee_local $3 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $3) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $0) - (i32.const 8) - ) - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (tee_local $3 - (i32.load - (get_local $1) - ) - ) - ) - (i32.load offset=4 - (get_local $3) - ) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $0) - (i32.const 16) - ) - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (tee_local $2 - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - ) - (call $eosio_assert - (i32.gt_u - (i32.sub - (i32.load offset=8 - (get_local $3) - ) - (get_local $2) - ) - (i32.const 7) - ) - (i32.const 384) - ) - (drop - (call $memcpy - (i32.add - (get_local $0) - (i32.const 24) - ) - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (i32.store offset=4 - (get_local $3) - (i32.add - (i32.load offset=4 - (get_local $3) - ) - (i32.const 8) - ) - ) - (drop - (call $_ZN5eosiorsINS_10datastreamIPKcEEEERT_S6_RNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE - (i32.load - (get_local $1) - ) - (i32.add - (get_local $0) - (i32.const 32) - ) - ) - ) - ) - (func $_ZN5boost4mp116detail16tuple_apply_implIRZN5eosio14execute_actionINS3_5tokenES5_JyyNS3_5assetENSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_EEUlDpT_E_RNS7_5tupleIJyyS6_SD_EEEJLj0ELj1ELj2ELj3EEEEDTclclsr3stdE7forwardISE_Efp_Espclsr3stdE3getIXT1_EEclsr3stdE7forwardISG_Efp0_EEEEOSE_OSG_NS0_16integer_sequenceIjJXspT1_EEEE (param $0 i32) (param $1 i32) - (local $2 i64) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $5 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 96) - ) - ) - ) - (i32.store - (i32.add - (get_local $5) - (i32.const 44) - ) - (i32.load - (i32.add - (get_local $1) - (i32.const 28) - ) - ) - ) - (i32.store - (tee_local $4 - (i32.add - (i32.add - (get_local $5) - (i32.const 32) - ) - (i32.const 8) - ) - ) - (i32.load - (i32.add - (get_local $1) - (i32.const 24) - ) - ) - ) - (i32.store offset=32 - (get_local $5) - (i32.load offset=16 - (get_local $1) - ) - ) - (i32.store offset=36 - (get_local $5) - (i32.load - (i32.add - (get_local $1) - (i32.const 20) - ) - ) - ) - (set_local $3 - (i64.load offset=8 - (get_local $1) - ) - ) - (set_local $2 - (i64.load - (get_local $1) - ) - ) - (drop - (call $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_ - (i32.add - (get_local $5) - (i32.const 16) - ) - (i32.add - (get_local $1) - (i32.const 32) - ) - ) - ) - (i64.store - (i32.add - (i32.add - (get_local $5) - (i32.const 48) - ) - (i32.const 8) - ) - (i64.load - (get_local $4) - ) - ) - (i64.store offset=48 - (get_local $5) - (i64.load offset=32 - (get_local $5) - ) - ) - (set_local $0 - (i32.add - (i32.load - (i32.load - (get_local $0) - ) - ) - (i32.shr_s - (tee_local $4 - (i32.load offset=4 - (tee_local $1 - (i32.load offset=4 - (get_local $0) - ) - ) - ) - ) - (i32.const 1) - ) - ) - ) - (set_local $1 - (i32.load - (get_local $1) - ) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (i32.and - (get_local $4) - (i32.const 1) - ) - ) - ) - (set_local $1 - (i32.load - (i32.add - (i32.load - (get_local $0) - ) - (get_local $1) - ) - ) - ) - ) - (i64.store - (tee_local $4 - (i32.add - (i32.add - (get_local $5) - (i32.const 80) - ) - (i32.const 8) - ) - ) - (i64.load - (i32.add - (i32.add - (get_local $5) - (i32.const 48) - ) - (i32.const 8) - ) - ) - ) - (i64.store offset=80 - (get_local $5) - (i64.load offset=48 - (get_local $5) - ) - ) - (drop - (call $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_ - (i32.add - (get_local $5) - (i32.const 64) - ) - (i32.add - (get_local $5) - (i32.const 16) - ) - ) - ) - (i64.store - (i32.add - (get_local $5) - (i32.const 8) - ) - (i64.load - (get_local $4) - ) - ) - (i64.store - (get_local $5) - (i64.load offset=80 - (get_local $5) - ) - ) - (call_indirect (type $FUNCSIG$vijjii) - (get_local $0) - (get_local $2) - (get_local $3) - (get_local $5) - (i32.add - (get_local $5) - (i32.const 64) - ) - (get_local $1) - ) - (block $label$1 - (br_if $label$1 - (i32.eqz - (i32.and - (i32.load8_u offset=64 - (get_local $5) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load offset=72 - (get_local $5) - ) - ) - ) - (block $label$2 - (br_if $label$2 - (i32.eqz - (i32.and - (i32.load8_u offset=16 - (get_local $5) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load offset=24 - (get_local $5) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $5) - (i32.const 96) - ) - ) - ) - (func $_ZN5boost4mp116detail16tuple_apply_implIRZN5eosio14execute_actionINS3_5tokenES5_JyNS3_5assetENSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEEEEbPT_MT0_FvDpT1_EEUlDpT_E_RNS7_5tupleIJyS6_SD_EEEJLj0ELj1ELj2EEEEDTclclsr3stdE7forwardISE_Efp_Espclsr3stdE3getIXT1_EEclsr3stdE7forwardISG_Efp0_EEEEOSE_OSG_NS0_16integer_sequenceIjJXspT1_EEEE (param $0 i32) (param $1 i32) - (local $2 i64) - (local $3 i32) - (local $4 i32) - (i32.store offset=4 - (i32.const 0) - (tee_local $4 - (i32.sub - (i32.load offset=4 - (i32.const 0) - ) - (i32.const 96) - ) - ) - ) - (i32.store - (i32.add - (i32.add - (get_local $4) - (i32.const 32) - ) - (i32.const 12) - ) - (i32.load - (i32.add - (get_local $1) - (i32.const 20) - ) - ) - ) - (i32.store - (tee_local $3 - (i32.add - (i32.add - (get_local $4) - (i32.const 32) - ) - (i32.const 8) - ) - ) - (i32.load - (i32.add - (get_local $1) - (i32.const 16) - ) - ) - ) - (i32.store offset=32 - (get_local $4) - (i32.load offset=8 - (get_local $1) - ) - ) - (i32.store offset=36 - (get_local $4) - (i32.load - (i32.add - (get_local $1) - (i32.const 12) - ) - ) - ) - (set_local $2 - (i64.load - (get_local $1) - ) - ) - (drop - (call $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_ - (i32.add - (get_local $4) - (i32.const 16) - ) - (i32.add - (get_local $1) - (i32.const 24) - ) - ) - ) - (i64.store - (i32.add - (i32.add - (get_local $4) - (i32.const 48) - ) - (i32.const 8) - ) - (i64.load - (get_local $3) - ) - ) - (i64.store offset=48 - (get_local $4) - (i64.load offset=32 - (get_local $4) - ) - ) - (set_local $0 - (i32.add - (i32.load - (i32.load - (get_local $0) - ) - ) - (i32.shr_s - (tee_local $3 - (i32.load offset=4 - (tee_local $1 - (i32.load offset=4 - (get_local $0) - ) - ) - ) - ) - (i32.const 1) - ) - ) - ) - (set_local $1 - (i32.load - (get_local $1) - ) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (i32.and - (get_local $3) - (i32.const 1) - ) - ) - ) - (set_local $1 - (i32.load - (i32.add - (i32.load - (get_local $0) - ) - (get_local $1) - ) - ) - ) - ) - (i64.store - (tee_local $3 - (i32.add - (i32.add - (get_local $4) - (i32.const 80) - ) - (i32.const 8) - ) - ) - (i64.load - (i32.add - (i32.add - (get_local $4) - (i32.const 48) - ) - (i32.const 8) - ) - ) - ) - (i64.store offset=80 - (get_local $4) - (i64.load offset=48 - (get_local $4) - ) - ) - (drop - (call $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_ - (i32.add - (get_local $4) - (i32.const 64) - ) - (i32.add - (get_local $4) - (i32.const 16) - ) - ) - ) - (i64.store - (i32.add - (get_local $4) - (i32.const 8) - ) - (i64.load - (get_local $3) - ) - ) - (i64.store - (get_local $4) - (i64.load offset=80 - (get_local $4) - ) - ) - (call_indirect (type $FUNCSIG$vijii) - (get_local $0) - (get_local $2) - (get_local $4) - (i32.add - (get_local $4) - (i32.const 64) - ) - (get_local $1) - ) - (block $label$1 - (br_if $label$1 - (i32.eqz - (i32.and - (i32.load8_u offset=64 - (get_local $4) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load offset=72 - (get_local $4) - ) - ) - ) - (block $label$2 - (br_if $label$2 - (i32.eqz - (i32.and - (i32.load8_u offset=16 - (get_local $4) - ) - (i32.const 1) - ) - ) - ) - (call $_ZdlPv - (i32.load offset=24 - (get_local $4) - ) - ) - ) - (i32.store offset=4 - (i32.const 0) - (i32.add - (get_local $4) - (i32.const 96) - ) - ) - ) - (func $malloc (param $0 i32) (result i32) - (call $_ZN5eosio14memory_manager6mallocEm - (i32.const 1988) - (get_local $0) - ) - ) - (func $_ZN5eosio14memory_manager6mallocEm (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (block $label$0 - (br_if $label$0 - (i32.eqz - (get_local $1) - ) - ) - (block $label$1 - (br_if $label$1 - (tee_local $13 - (i32.load offset=8384 - (get_local $0) - ) - ) - ) - (set_local $13 - (i32.const 16) - ) - (i32.store - (i32.add - (get_local $0) - (i32.const 8384) - ) - (i32.const 16) - ) - ) - (set_local $2 - (select - (i32.sub - (i32.add - (get_local $1) - (i32.const 8) - ) - (tee_local $2 - (i32.and - (i32.add - (get_local $1) - (i32.const 4) - ) - (i32.const 7) - ) - ) - ) - (get_local $1) - (get_local $2) - ) - ) - (block $label$2 - (block $label$3 - (block $label$4 - (br_if $label$4 - (i32.ge_u - (tee_local $10 - (i32.load offset=8388 - (get_local $0) - ) - ) - (get_local $13) - ) - ) - (set_local $1 - (i32.add - (i32.add - (get_local $0) - (i32.mul - (get_local $10) - (i32.const 12) - ) - ) - (i32.const 8192) - ) - ) - (block $label$5 - (br_if $label$5 - (get_local $10) - ) - (br_if $label$5 - (i32.load - (tee_local $13 - (i32.add - (get_local $0) - (i32.const 8196) - ) - ) - ) - ) - (i32.store - (get_local $1) - (i32.const 8192) - ) - (i32.store - (get_local $13) - (get_local $0) - ) - ) - (set_local $10 - (i32.add - (get_local $2) - (i32.const 4) - ) - ) - (loop $label$6 - (block $label$7 - (br_if $label$7 - (i32.gt_u - (i32.add - (tee_local $13 - (i32.load offset=8 - (get_local $1) - ) - ) - (get_local $10) - ) - (i32.load - (get_local $1) - ) - ) - ) - (i32.store - (tee_local $13 - (i32.add - (i32.load offset=4 - (get_local $1) - ) - (get_local $13) - ) - ) - (i32.or - (i32.and - (i32.load - (get_local $13) - ) - (i32.const -2147483648) - ) - (get_local $2) - ) - ) - (i32.store - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 8) - ) - ) - (i32.add - (i32.load - (get_local $1) - ) - (get_local $10) - ) - ) - (i32.store - (get_local $13) - (i32.or - (i32.load - (get_local $13) - ) - (i32.const -2147483648) - ) - ) - (br_if $label$3 - (tee_local $1 - (i32.add - (get_local $13) - (i32.const 4) - ) - ) - ) - ) - (br_if $label$6 - (tee_local $1 - (call $_ZN5eosio14memory_manager16next_active_heapEv - (get_local $0) - ) - ) - ) - ) - ) - (set_local $4 - (i32.sub - (i32.const 2147483644) - (get_local $2) - ) - ) - (set_local $11 - (i32.add - (get_local $0) - (i32.const 8392) - ) - ) - (set_local $12 - (i32.add - (get_local $0) - (i32.const 8384) - ) - ) - (set_local $13 - (tee_local $3 - (i32.load offset=8392 - (get_local $0) - ) - ) - ) - (loop $label$8 - (call $eosio_assert - (i32.eq - (i32.load - (i32.add - (tee_local $1 - (i32.add - (get_local $0) - (i32.mul - (get_local $13) - (i32.const 12) - ) - ) - ) - (i32.const 8200) - ) - ) - (i32.load - (tee_local $5 - (i32.add - (get_local $1) - (i32.const 8192) - ) - ) - ) - ) - (i32.const 10384) - ) - (set_local $13 - (i32.add - (tee_local $6 - (i32.load - (i32.add - (get_local $1) - (i32.const 8196) - ) - ) - ) - (i32.const 4) - ) - ) - (loop $label$9 - (set_local $7 - (i32.add - (get_local $6) - (i32.load - (get_local $5) - ) - ) - ) - (set_local $1 - (i32.and - (tee_local $9 - (i32.load - (tee_local $8 - (i32.add - (get_local $13) - (i32.const -4) - ) - ) - ) - ) - (i32.const 2147483647) - ) - ) - (block $label$10 - (br_if $label$10 - (i32.lt_s - (get_local $9) - (i32.const 0) - ) - ) - (block $label$11 - (br_if $label$11 - (i32.ge_u - (get_local $1) - (get_local $2) - ) - ) - (loop $label$12 - (br_if $label$11 - (i32.ge_u - (tee_local $10 - (i32.add - (get_local $13) - (get_local $1) - ) - ) - (get_local $7) - ) - ) - (br_if $label$11 - (i32.lt_s - (tee_local $10 - (i32.load - (get_local $10) - ) - ) - (i32.const 0) - ) - ) - (br_if $label$12 - (i32.lt_u - (tee_local $1 - (i32.add - (i32.add - (get_local $1) - (i32.and - (get_local $10) - (i32.const 2147483647) - ) - ) - (i32.const 4) - ) - ) - (get_local $2) - ) - ) - ) - ) - (i32.store - (get_local $8) - (i32.or - (select - (get_local $1) - (get_local $2) - (i32.lt_u - (get_local $1) - (get_local $2) - ) - ) - (i32.and - (get_local $9) - (i32.const -2147483648) - ) - ) - ) - (block $label$13 - (br_if $label$13 - (i32.le_u - (get_local $1) - (get_local $2) - ) - ) - (i32.store - (i32.add - (get_local $13) - (get_local $2) - ) - (i32.and - (i32.add - (get_local $4) - (get_local $1) - ) - (i32.const 2147483647) - ) - ) - ) - (br_if $label$2 - (i32.ge_u - (get_local $1) - (get_local $2) - ) - ) - ) - (br_if $label$9 - (i32.lt_u - (tee_local $13 - (i32.add - (i32.add - (get_local $13) - (get_local $1) - ) - (i32.const 4) - ) - ) - (get_local $7) - ) - ) - ) - (set_local $1 - (i32.const 0) - ) - (i32.store - (get_local $11) - (tee_local $13 - (select - (i32.const 0) - (tee_local $13 - (i32.add - (i32.load - (get_local $11) - ) - (i32.const 1) - ) - ) - (i32.eq - (get_local $13) - (i32.load - (get_local $12) - ) - ) - ) - ) - ) - (br_if $label$8 - (i32.ne - (get_local $13) - (get_local $3) - ) - ) - ) - ) - (return - (get_local $1) - ) - ) - (i32.store - (get_local $8) - (i32.or - (i32.load - (get_local $8) - ) - (i32.const -2147483648) - ) - ) - (return - (get_local $13) - ) - ) - (i32.const 0) - ) - (func $_ZN5eosio14memory_manager16next_active_heapEv (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (set_local $1 - (i32.load offset=8388 - (get_local $0) - ) - ) - (block $label$0 - (block $label$1 - (br_if $label$1 - (i32.eqz - (i32.load8_u offset=10470 - (i32.const 0) - ) - ) - ) - (set_local $7 - (i32.load offset=10472 - (i32.const 0) - ) - ) - (br $label$0) - ) - (set_local $7 - (current_memory) - ) - (i32.store8 offset=10470 - (i32.const 0) - (i32.const 1) - ) - (i32.store offset=10472 - (i32.const 0) - (tee_local $7 - (i32.shl - (get_local $7) - (i32.const 16) - ) - ) - ) - ) - (set_local $3 - (get_local $7) - ) - (block $label$2 - (block $label$3 - (block $label$4 - (block $label$5 - (br_if $label$5 - (i32.le_u - (tee_local $2 - (i32.shr_u - (i32.add - (get_local $7) - (i32.const 65535) - ) - (i32.const 16) - ) - ) - (tee_local $8 - (current_memory) - ) - ) - ) - (drop - (grow_memory - (i32.sub - (get_local $2) - (get_local $8) - ) - ) - ) - (set_local $8 - (i32.const 0) - ) - (br_if $label$4 - (i32.ne - (get_local $2) - (current_memory) - ) - ) - (set_local $3 - (i32.load offset=10472 - (i32.const 0) - ) - ) - ) - (set_local $8 - (i32.const 0) - ) - (i32.store offset=10472 - (i32.const 0) - (get_local $3) - ) - (br_if $label$4 - (i32.lt_s - (get_local $7) - (i32.const 0) - ) - ) - (set_local $2 - (i32.add - (get_local $0) - (i32.mul - (get_local $1) - (i32.const 12) - ) - ) - ) - (set_local $7 - (i32.sub - (i32.sub - (i32.add - (get_local $7) - (select - (i32.const 65536) - (i32.const 131072) - (tee_local $6 - (i32.lt_u - (tee_local $8 - (i32.and - (get_local $7) - (i32.const 65535) - ) - ) - (i32.const 64513) - ) - ) - ) - ) - (select - (get_local $8) - (i32.and - (get_local $7) - (i32.const 131071) - ) - (get_local $6) - ) - ) - (get_local $7) - ) - ) - (block $label$6 - (br_if $label$6 - (i32.load8_u offset=10470 - (i32.const 0) - ) - ) - (set_local $3 - (current_memory) - ) - (i32.store8 offset=10470 - (i32.const 0) - (i32.const 1) - ) - (i32.store offset=10472 - (i32.const 0) - (tee_local $3 - (i32.shl - (get_local $3) - (i32.const 16) - ) - ) - ) - ) - (set_local $2 - (i32.add - (get_local $2) - (i32.const 8192) - ) - ) - (br_if $label$3 - (i32.lt_s - (get_local $7) - (i32.const 0) - ) - ) - (set_local $6 - (get_local $3) - ) - (block $label$7 - (br_if $label$7 - (i32.le_u - (tee_local $8 - (i32.shr_u - (i32.add - (i32.add - (tee_local $5 - (i32.and - (i32.add - (get_local $7) - (i32.const 7) - ) - (i32.const -8) - ) - ) - (get_local $3) - ) - (i32.const 65535) - ) - (i32.const 16) - ) - ) - (tee_local $4 - (current_memory) - ) - ) - ) - (drop - (grow_memory - (i32.sub - (get_local $8) - (get_local $4) - ) - ) - ) - (br_if $label$3 - (i32.ne - (get_local $8) - (current_memory) - ) - ) - (set_local $6 - (i32.load offset=10472 - (i32.const 0) - ) - ) - ) - (i32.store offset=10472 - (i32.const 0) - (i32.add - (get_local $6) - (get_local $5) - ) - ) - (br_if $label$3 - (i32.eq - (get_local $3) - (i32.const -1) - ) - ) - (br_if $label$2 - (i32.eq - (i32.add - (tee_local $6 - (i32.load - (i32.add - (tee_local $1 - (i32.add - (get_local $0) - (i32.mul - (get_local $1) - (i32.const 12) - ) - ) - ) - (i32.const 8196) - ) - ) - ) - (tee_local $8 - (i32.load - (get_local $2) - ) - ) - ) - (get_local $3) - ) - ) - (block $label$8 - (br_if $label$8 - (i32.eq - (get_local $8) - (tee_local $1 - (i32.load - (tee_local $5 - (i32.add - (get_local $1) - (i32.const 8200) - ) - ) - ) - ) - ) - ) - (i32.store - (tee_local $6 - (i32.add - (get_local $6) - (get_local $1) - ) - ) - (i32.or - (i32.and - (i32.load - (get_local $6) - ) - (i32.const -2147483648) - ) - (i32.add - (i32.sub - (i32.const -4) - (get_local $1) - ) - (get_local $8) - ) - ) - ) - (i32.store - (get_local $5) - (i32.load - (get_local $2) - ) - ) - (i32.store - (get_local $6) - (i32.and - (i32.load - (get_local $6) - ) - (i32.const 2147483647) - ) - ) - ) - (i32.store - (tee_local $2 - (i32.add - (get_local $0) - (i32.const 8388) - ) - ) - (tee_local $2 - (i32.add - (i32.load - (get_local $2) - ) - (i32.const 1) - ) - ) - ) - (i32.store - (i32.add - (tee_local $0 - (i32.add - (get_local $0) - (i32.mul - (get_local $2) - (i32.const 12) - ) - ) - ) - (i32.const 8196) - ) - (get_local $3) - ) - (i32.store - (tee_local $8 - (i32.add - (get_local $0) - (i32.const 8192) - ) - ) - (get_local $7) - ) - ) - (return - (get_local $8) - ) - ) - (block $label$9 - (br_if $label$9 - (i32.eq - (tee_local $8 - (i32.load - (get_local $2) - ) - ) - (tee_local $7 - (i32.load - (tee_local $1 - (i32.add - (tee_local $3 - (i32.add - (get_local $0) - (i32.mul - (get_local $1) - (i32.const 12) - ) - ) - ) - (i32.const 8200) - ) - ) - ) - ) - ) - ) - (i32.store - (tee_local $3 - (i32.add - (i32.load - (i32.add - (get_local $3) - (i32.const 8196) - ) - ) - (get_local $7) - ) - ) - (i32.or - (i32.and - (i32.load - (get_local $3) - ) - (i32.const -2147483648) - ) - (i32.add - (i32.sub - (i32.const -4) - (get_local $7) - ) - (get_local $8) - ) - ) - ) - (i32.store - (get_local $1) - (i32.load - (get_local $2) - ) - ) - (i32.store - (get_local $3) - (i32.and - (i32.load - (get_local $3) - ) - (i32.const 2147483647) - ) - ) - ) - (i32.store offset=8384 - (get_local $0) - (tee_local $3 - (i32.add - (i32.load - (tee_local $7 - (i32.add - (get_local $0) - (i32.const 8388) - ) - ) - ) - (i32.const 1) - ) - ) - ) - (i32.store - (get_local $7) - (get_local $3) - ) - (return - (i32.const 0) - ) - ) - (i32.store - (get_local $2) - (i32.add - (get_local $8) - (get_local $7) - ) - ) - (get_local $2) - ) - (func $free (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (block $label$0 - (block $label$1 - (br_if $label$1 - (i32.eqz - (get_local $0) - ) - ) - (br_if $label$1 - (i32.lt_s - (tee_local $2 - (i32.load offset=10372 - (i32.const 0) - ) - ) - (i32.const 1) - ) - ) - (set_local $3 - (i32.const 10180) - ) - (set_local $1 - (i32.add - (i32.mul - (get_local $2) - (i32.const 12) - ) - (i32.const 10180) - ) - ) - (loop $label$2 - (br_if $label$1 - (i32.eqz - (tee_local $2 - (i32.load - (i32.add - (get_local $3) - (i32.const 4) - ) - ) - ) - ) - ) - (block $label$3 - (br_if $label$3 - (i32.gt_u - (i32.add - (get_local $2) - (i32.const 4) - ) - (get_local $0) - ) - ) - (br_if $label$0 - (i32.gt_u - (i32.add - (get_local $2) - (i32.load - (get_local $3) - ) - ) - (get_local $0) - ) - ) - ) - (br_if $label$2 - (i32.lt_u - (tee_local $3 - (i32.add - (get_local $3) - (i32.const 12) - ) - ) - (get_local $1) - ) - ) - ) - ) - (return) - ) - (i32.store - (tee_local $3 - (i32.add - (get_local $0) - (i32.const -4) - ) - ) - (i32.and - (i32.load - (get_local $3) - ) - (i32.const 2147483647) - ) - ) - ) - (func $_Znwj (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (block $label$0 - (br_if $label$0 - (tee_local $0 - (call $malloc - (tee_local $1 - (select - (get_local $0) - (i32.const 1) - (get_local $0) - ) - ) - ) - ) - ) - (loop $label$1 - (set_local $0 - (i32.const 0) - ) - (br_if $label$0 - (i32.eqz - (tee_local $2 - (i32.load offset=10476 - (i32.const 0) - ) - ) - ) - ) - (call_indirect (type $FUNCSIG$v) - (get_local $2) - ) - (br_if $label$1 - (i32.eqz - (tee_local $0 - (call $malloc - (get_local $1) - ) - ) - ) - ) - ) - ) - (get_local $0) - ) - (func $_ZdlPv (param $0 i32) - (block $label$0 - (br_if $label$0 - (i32.eqz - (get_local $0) - ) - ) - (call $free - (get_local $0) - ) - ) - ) - (func $_ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv (param $0 i32) - (call $abort) - (unreachable) - ) - (func $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEj (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (block $label$0 - (br_if $label$0 - (i32.ge_u - (get_local $1) - (i32.const -16) - ) - ) - (set_local $2 - (i32.const 10) - ) - (block $label$1 - (br_if $label$1 - (i32.eqz - (i32.and - (tee_local $5 - (i32.load8_u - (get_local $0) - ) - ) - (i32.const 1) - ) - ) - ) - (set_local $2 - (i32.add - (i32.and - (tee_local $5 - (i32.load - (get_local $0) - ) - ) - (i32.const -2) - ) - (i32.const -1) - ) - ) - ) - (block $label$2 - (block $label$3 - (br_if $label$3 - (i32.and - (get_local $5) - (i32.const 1) - ) - ) - (set_local $3 - (i32.shr_u - (i32.and - (get_local $5) - (i32.const 254) - ) - (i32.const 1) - ) - ) - (br $label$2) - ) - (set_local $3 - (i32.load offset=4 - (get_local $0) - ) - ) - ) - (set_local $4 - (i32.const 10) - ) - (block $label$4 - (br_if $label$4 - (i32.lt_u - (tee_local $1 - (select - (get_local $3) - (get_local $1) - (i32.gt_u - (get_local $3) - (get_local $1) - ) - ) - ) - (i32.const 11) - ) - ) - (set_local $4 - (i32.add - (i32.and - (i32.add - (get_local $1) - (i32.const 16) - ) - (i32.const -16) - ) - (i32.const -1) - ) - ) - ) - (block $label$5 - (br_if $label$5 - (i32.eq - (get_local $4) - (get_local $2) - ) - ) - (block $label$6 - (block $label$7 - (br_if $label$7 - (i32.ne - (get_local $4) - (i32.const 10) - ) - ) - (set_local $6 - (i32.const 1) - ) - (set_local $1 - (i32.add - (get_local $0) - (i32.const 1) - ) - ) - (set_local $2 - (i32.load offset=8 - (get_local $0) - ) - ) - (set_local $7 - (i32.const 0) - ) - (br $label$6) - ) - (set_local $1 - (call $_Znwj - (i32.add - (get_local $4) - (i32.const 1) - ) - ) - ) - (block $label$8 - (br_if $label$8 - (i32.gt_u - (get_local $4) - (get_local $2) - ) - ) - (br_if $label$5 - (i32.eqz - (get_local $1) - ) - ) - ) - (block $label$9 - (br_if $label$9 - (i32.and - (tee_local $5 - (i32.load8_u - (get_local $0) - ) - ) - (i32.const 1) - ) - ) - (set_local $7 - (i32.const 1) - ) - (set_local $2 - (i32.add - (get_local $0) - (i32.const 1) - ) - ) - (set_local $6 - (i32.const 0) - ) - (br $label$6) - ) - (set_local $2 - (i32.load offset=8 - (get_local $0) - ) - ) - (set_local $6 - (i32.const 1) - ) - (set_local $7 - (i32.const 1) - ) - ) - (block $label$10 - (block $label$11 - (br_if $label$11 - (i32.and - (get_local $5) - (i32.const 1) - ) - ) - (set_local $5 - (i32.shr_u - (i32.and - (get_local $5) - (i32.const 254) - ) - (i32.const 1) - ) - ) - (br $label$10) - ) - (set_local $5 - (i32.load offset=4 - (get_local $0) - ) - ) - ) - (block $label$12 - (br_if $label$12 - (i32.eqz - (tee_local $5 - (i32.add - (get_local $5) - (i32.const 1) - ) - ) - ) - ) - (drop - (call $memcpy - (get_local $1) - (get_local $2) - (get_local $5) - ) - ) - ) - (block $label$13 - (br_if $label$13 - (i32.eqz - (get_local $6) - ) - ) - (call $_ZdlPv - (get_local $2) - ) - ) - (block $label$14 - (br_if $label$14 - (i32.eqz - (get_local $7) - ) - ) - (i32.store offset=4 - (get_local $0) - (get_local $3) - ) - (i32.store offset=8 - (get_local $0) - (get_local $1) - ) - (i32.store - (get_local $0) - (i32.or - (i32.add - (get_local $4) - (i32.const 1) - ) - (i32.const 1) - ) - ) - (return) - ) - (i32.store8 - (get_local $0) - (i32.shl - (get_local $3) - (i32.const 1) - ) - ) - ) - (return) - ) - (call $abort) - (unreachable) - ) - (func $_ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv (param $0 i32) - (call $abort) - (unreachable) - ) - (func $_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_ (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (i64.store align=4 - (get_local $0) - (i64.const 0) - ) - (i32.store - (tee_local $3 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (i32.const 0) - ) - (block $label$0 - (br_if $label$0 - (i32.and - (i32.load8_u - (get_local $1) - ) - (i32.const 1) - ) - ) - (i64.store align=4 - (get_local $0) - (i64.load align=4 - (get_local $1) - ) - ) - (i32.store - (get_local $3) - (i32.load - (i32.add - (get_local $1) - (i32.const 8) - ) - ) - ) - (return - (get_local $0) - ) - ) - (block $label$1 - (br_if $label$1 - (i32.ge_u - (tee_local $3 - (i32.load offset=4 - (get_local $1) - ) - ) - (i32.const -16) - ) - ) - (set_local $2 - (i32.load offset=8 - (get_local $1) - ) - ) - (block $label$2 - (block $label$3 - (block $label$4 - (br_if $label$4 - (i32.ge_u - (get_local $3) - (i32.const 11) - ) - ) - (i32.store8 - (get_local $0) - (i32.shl - (get_local $3) - (i32.const 1) - ) - ) - (set_local $1 - (i32.add - (get_local $0) - (i32.const 1) - ) - ) - (br_if $label$3 - (get_local $3) - ) - (br $label$2) - ) - (set_local $1 - (call $_Znwj - (tee_local $4 - (i32.and - (i32.add - (get_local $3) - (i32.const 16) - ) - (i32.const -16) - ) - ) - ) - ) - (i32.store - (get_local $0) - (i32.or - (get_local $4) - (i32.const 1) - ) - ) - (i32.store offset=8 - (get_local $0) - (get_local $1) - ) - (i32.store offset=4 - (get_local $0) - (get_local $3) - ) - ) - (drop - (call $memcpy - (get_local $1) - (get_local $2) - (get_local $3) - ) - ) - ) - (i32.store8 - (i32.add - (get_local $1) - (get_local $3) - ) - (i32.const 0) - ) - (return - (get_local $0) - ) - ) - (call $abort) - (unreachable) - ) - (func $memcmp (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (set_local $5 - (i32.const 0) - ) - (block $label$0 - (br_if $label$0 - (i32.eqz - (get_local $2) - ) - ) - (block $label$1 - (loop $label$2 - (br_if $label$1 - (i32.ne - (tee_local $3 - (i32.load8_u - (get_local $0) - ) - ) - (tee_local $4 - (i32.load8_u - (get_local $1) - ) - ) - ) - ) - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (set_local $0 - (i32.add - (get_local $0) - (i32.const 1) - ) - ) - (br_if $label$2 - (tee_local $2 - (i32.add - (get_local $2) - (i32.const -1) - ) - ) - ) - (br $label$0) - ) - ) - (set_local $5 - (i32.sub - (get_local $3) - (get_local $4) - ) - ) - ) - (get_local $5) - ) - (func $__wasm_nullptr (type $FUNCSIG$v) - (unreachable) - ) -) diff --git a/contracts/ore.usage_log/ore.usage_log.cpp b/contracts/ore.usage_log/ore.usage_log.cpp index a08ca87..3f1ad53 100644 --- a/contracts/ore.usage_log/ore.usage_log.cpp +++ b/contracts/ore.usage_log/ore.usage_log.cpp @@ -1,21 +1,20 @@ #include #include +#include #include +#include using namespace eosio; using namespace std; -class usage_log : public eosio::contract +class [[eosio::contract("ore.usage_log")]] usage_log : public eosio::contract { public: - usage_log(account_name self) : eosio::contract(self) {} + using contract::contract; + usage_log(name receiver, name code, datastream ds): contract(receiver, code, ds), _logs(receiver, receiver.value){} - //@abi action - void createlog(uint64_t instrument_id, string right_name, string token_hash, uint64_t timestamp) + ACTION createlog(uint64_t instrument_id, string right_name, string token_hash, uint64_t timestamp) { - - logs_table _logs(_self, _self); - uint64_t right_hash = hashStr(right_name); _logs.emplace(_self, [&](auto &a) { @@ -25,31 +24,29 @@ class usage_log : public eosio::contract a.token_hash = hashStr(token_hash); a.timestamp = timestamp; }); + + print("action:createlog Log created for instrument id : " + to_string(instrument_id) + " and right name " + right_name + "\n"); + } // TODO: require authority of the reconciler // delets the entry from the log table with matching token_hash - // @abi action - void deletelog(uint64_t instrument_id, string token_hash) + ACTION deletelog(uint64_t instrument_id, string token_hash) { - logs_table _logs(_self, _self); - auto itr = _logs.find(hashStr(token_hash)); - eosio_assert(itr != _logs.end(), "No log exist for the given pair or right and instrument"); + string msg = "No log exist for the given pair of instrument id " + to_string(instrument_id) + " and access token hash " + token_hash + "\n"; + eosio_assert(itr != _logs.end(), msg.c_str()); - print("token hash", itr->token_hash); + print("action:deletelog Log deleted for instrument id : " + to_string(instrument_id) + " and access token hash" + token_hash + "\n"); _logs.erase(itr); } - //@abi action - void updatecount(uint64_t instrument_id, string right_name, asset cpu) + ACTION updatecount(uint64_t instrument_id, string right_name, asset cpu) { uint64_t right_hash = hashStr(right_name); - //Test the scoping - counts_table _counts(_self, instrument_id); auto itr = _counts.find(right_hash); @@ -59,7 +56,7 @@ class usage_log : public eosio::contract _counts.emplace(_self, [&](auto &a) { a.right_hash = right_hash; a.right_name = right_name; - a.last_usage_time = now(); + a.last_usage_time = time_point_sec(now()); a.total_count = 1; a.total_cpu = cpu; }); @@ -67,16 +64,18 @@ class usage_log : public eosio::contract else { _counts.modify(itr, _self, [&](auto &a) { - a.last_usage_time = now(); + a.last_usage_time = time_point_sec(now()); a.total_count += 1; a.total_cpu += cpu; }); } + + print("action:updatecount Call count updated for instrument id : " + to_string(instrument_id) + " and right name " + right_name + "\n"); + } private: - //@abi table logs i64 - struct log + TABLE log { uint64_t instrument_id; uint64_t right_hash; @@ -89,25 +88,26 @@ class usage_log : public eosio::contract }; //following structure enables fast query of api call count for the verifier - //@abi table counts i64 - struct callcount + TABLE callcount { uint64_t right_hash; string right_name; - time last_usage_time; + time_point_sec last_usage_time; uint64_t total_count; asset total_cpu; auto primary_key() const { return right_hash; } EOSLIB_SERIALIZE(callcount, (right_hash)(right_name)(last_usage_time)(total_count)(total_cpu)) }; + + typedef eosio::multi_index<"counts"_n, callcount> counts_table; + typedef eosio::multi_index<"logs"_n, log> logs_table; - typedef eosio::multi_index counts_table; - typedef eosio::multi_index logs_table; + logs_table _logs; uint64_t hashStr(const string &strkey) { return hash{}(strkey); } }; -EOSIO_ABI(usage_log, (createlog)(deletelog)(updatecount)) +EOSIO_DISPATCH(usage_log, (createlog)(deletelog)(updatecount)) diff --git a/contracts/ore_types/ore_types.hpp b/contracts/ore_types/ore_types.hpp index c61726a..11a29dd 100644 --- a/contracts/ore_types/ore_types.hpp +++ b/contracts/ore_types/ore_types.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include "eosiolib/transaction.hpp" #include using namespace std; @@ -57,7 +57,7 @@ class ore_types : public contract { string right_name; vector urls; - vector whitelist; + vector whitelist; }; struct api_voucher_params diff --git a/tests/build_and_test.sh b/tests/build_and_test.sh new file mode 100755 index 0000000..c9fe1d7 --- /dev/null +++ b/tests/build_and_test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +cd ~/ore-protocol/contracts + +cd ore.instrument && mkdir build +eosio-cpp ore.instrument.cpp -o build/ore.instrument.wast +eosio-abigen ore.instrument.cpp --contract=ore.instrument --output=build/ore.instrument.abi + +cd ../ore.rights_registry && mkdir build +eosio-cpp ore.rights_registry.cpp -o build/ore.rights_registry.wast +eosio-abigen ore.rights_registry.cpp --contract=ore.rights_registry --output=build/ore.rights_registry.abi + +cd ../ore.usage_log && mkdir build +eosio-cpp ore.usage_log.cpp -o build/ore.usage_log.wast +eosio-abigen ore.usage_log.cpp --contract=ore.usage_log --output=build/ore.usage_log.abi + +cd ../ore.standard_token && mkdir build +eosio-cpp ore.standard_token.cpp -o build/ore.standard_token.wast +eosio-abigen ore.standard_token.cpp --contract=ore.standard_token --output=build/ore.standard_token.abi diff --git a/tests/confirmation.py b/tests/confirmation.py deleted file mode 100644 index 1159227..0000000 --- a/tests/confirmation.py +++ /dev/null @@ -1,239 +0,0 @@ -# python3 ./tests/instrumenttest.py - -import time -import setup -import sys -import json -import eosf -import node -import unittest -from termcolor import cprint - -wallet_name = "" # Enter wallet name -wallet_pass = "" # Enter wallet password - -""" -This flag needs to be set to `True` only for the initial run -or after the contract is changed and re-built -""" -deployment = True - -setup.set_verbose(True) -setup.use_keosd(True) -setup.set_nodeos_URL("https://ore-staging.openrights.exchange:443") -setup.set_json(False) -#setup.set_command_line_mode(True) - -class Test1(unittest.TestCase): - - def run(self, result=None): - """ Stop after first error """ - if not result.failures: - super().run(result) - - @classmethod - def setUpClass(cls): - global contractPath - # set this variable to the local path for the contracts folder - contractPath = "/Users/basar/Workspace/ore-protocol/contracts" - - wallet = eosf.Wallet(wallet_name, wallet_pass) - assert(not wallet.error) - - global account_master - account_master = eosf.AccountMaster() - wallet.import_key(account_master) - assert(not account_master.error) - - global test1 - test1 = eosf.account(account_master, name="test1") - wallet.import_key(test1) - assert(not test1.error) - - global test2 - test2 = eosf.account(account_master, name="test2") - wallet.import_key(test2) - assert(not test2.error) - - global app_apim - app_apim = eosf.account(account_master, name="app.apim") - wallet.import_key(app_apim) - assert(not app_apim.error) - - token_deploy = eosf.account(account_master, name="ore.token") - wallet.import_key(token_deploy) - assert(not token_deploy.error) - - instr_deploy = eosf.account(account_master, name="instr.ore") - wallet.import_key(instr_deploy) - assert(not instr_deploy.error) - - rights_deploy = eosf.account(account_master, name="rights.ore") - wallet.import_key(rights_deploy) - assert(not rights_deploy.error) - - - contract_eosio_bios = eosf.Contract( - account_master, "eosio.bios").deploy() - assert(not contract_eosio_bios.error) - - global token_contract - token_contract = eosf.Contract(token_deploy, contractPath+"/ore.standard_token") - assert(not token_contract.error) - - global instr_ore - instr_ore = eosf.Contract(instr_deploy, contractPath+"/ore.instrument") - assert(not instr_ore.error) - - global rights_ore - rights_ore = eosf.Contract(rights_deploy, contractPath+"/ore.rights_registry") - assert(not rights_ore.error) - - - deployment = token_contract.deploy() - assert(not deployment.error) - - deployment = instr_ore.deploy() - assert(not deployment.error) - - deployment = rights_ore.deploy() - assert(not deployment.error) - - - def setUp(self): - pass - - - def test_01(self): - - cprint(""" -OREINST TOKEN TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("OREINST create") - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "create", - '{"issuer":"' - + str(account_master) - + '", "maximum_supply":"100000000.0000 OREINST"}').error) - - cprint(""" -INSTRUMENT CREATE FAIL TEST STARTED - """, 'yellow') - - cprint("instrument contract tries to create a symbol other than OREINST and fails", 'magenta') - self.assertTrue(instr_ore.push_action( - "create", - '{"issuer":"' - + str(account_master) - + '", "maximum_supply":"100000000.0000 TEST"}').error) - - cprint(""" -Action contract.push_action("OREINST issue") - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "issue", - '{"to":"' + 'instr.ore' - + '", "quantity":"10000000.0000 OREINST", "memo": "OREINST token issued"}', - account_master).error) - - - - def test_02(self): - - cprint(""" -RIGHT SET ACTION TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("upsertright", app_apim) - """, 'magenta') - self.assertFalse(rights_ore.push_action( - "upsertright", - '{"issuer":"' + 'app.apim' - + '","right_name":"cloud.hadron.contest-2018-07","urls":[{"url":"https://contest-hadron-dot-partner-aikon.appspot.com/contest-1","method":"get","matches_params":[],"token_life_span":100,"is_default":1}],"issuer_whitelist":["app.apim"]}' - , app_apim).error) - - def test_03(self): - - cprint(""" -INSTRUMENT MINT TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("mint", app_apim) - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "mint", - '{"minter":"' + 'app.apim' - + '","owner":"' + 'app.apim' - +'","instrument":'+ '{"issuer":"app.apim", "instrument_class":"class", "description":"description", "instrument_template":"template", "security_type":"security",' - + '"rights":[], "parent_instrument_id":"0", "data":[],' - + '"start_time":"0", "end_time":"0"}' - + ',"instrumentId":' + '0' - + '}' - , app_apim).error) - cprint(""" -Assign t1 = instr_ore.table("tokens", "tokens") - """, 'green') - t1 = instr_ore.table("tokens", "instr.ore") - - cprint(""" -Get the OREINST balance as 1.0000 ORE from the accounts table for app.apim) - """,'green') - t2 = instr_ore.table("accounts","app.apim") - - def test_04(self): - - cprint(""" -INSTRUMENT TRANSFER TESTS STARTED - """, 'yellow') - - self.assertFalse(instr_ore.push_action( - "transfer", - '{"sender":"app.apim", "to":"test1", "token_id":0}', app_apim).error) - t3 = instr_ore.table("accounts","app.apim") - t4 = instr_ore.table("accounts","test1") - def test_05(self): - - cprint(""" -INSTRUMENT APPROVE TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("approve", app_apim) - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "approve", - '{"from":"' + 'test1' - + '","to":"' + 'test2' - +'","token_id":'+ '0' - + '}' - , test1).error) - - def test_06(self): - cprint(""" -INSTRUMENT TRANSFERFROM TESTS STARTED - """, 'yellow') - def test_07(self): - cprint(""" -INSTRUMENT BURN TESTS STARTED - """, 'yellow') - - def test_07(self): - cprint(""" -INSTRUMENT BURNFROM TESTS STARTED - """, 'yellow') - def tearDown(self): - pass - - - @classmethod - def tearDownClass(cls): - node.stop() - - -if __name__ == "__main__": - unittest.main() \ No newline at end of file diff --git a/tests/instrument.py b/tests/instrument.py new file mode 100644 index 0000000..f5aa4aa --- /dev/null +++ b/tests/instrument.py @@ -0,0 +1,593 @@ +import unittest +from eosfactory.eosf import * +import time + +verbosity([Verbosity.INFO, Verbosity.OUT, Verbosity.TRACE, Verbosity.DEBUG]) + +class Test(unittest.TestCase): + + def run(self, result=None): + super().run(result) + + + @classmethod + def setUpClass(cls): + SCENARIO(''' + Create a contract from template, then build and deploy it. + ''') + reset() + create_wallet() + create_master_account("master") + + COMMENT(''' + Create test accounts: + ''') + create_account("app", master) + create_account("notminter", master) + + + def setUp(self): + pass + + + def test_01(self): + + create_account("right", master, account_name="rights.ore") + right_contract = Contract(right, "/root/ore-protocol/contracts/ore.rights_registry") + right_contract.build() + right_contract.deploy() + + create_account("instr", master, account_name="instr.ore") + instr_contract = Contract(instr, "/root/ore-protocol/contracts/ore.instrument") + instr_contract.build() + instr_contract.deploy() + + def test_02(self): + COMMENT(''' + Create and Issue OREINST: + ''') + + instr.push_action( + "create", + { + "issuer": instr, + "maximum_supply": "100000000.0000 OREINST" + }, + permission=(instr, Permission.ACTIVE)) + + instr.push_action( + "issue", + { + "to": instr, + "quantity": "10000000.0000 OREINST", + "memo": "" + }, + permission=(instr, Permission.ACTIVE)) + + def test_03(self): + COMMENT(''' + Register rights: + ''') + + right.push_action( + "upsertright", + { + "owner": app, + "right_name": "apimarket.manager.licenseApi", + "urls": [{ + "base_right": "", + "url": " ore://manager.apim/action/licenseapi", + "method": "post", + "matches_params": [{ + "name": "sla", + "value": "default" + }], + "token_life_span": 100, + "is_default": 1 + }], + "issuer_whitelist": [app] + }, + permission=(app, Permission.ACTIVE)) + + right.push_action( + "upsertright", + { + "owner": app, + "right_name": "apimarket.manager.licenseApi2", + "urls": [{ + "base_right": "", + "url": " ore://manager.apim/action/licenseapi", + "method": "post", + "matches_params": [{ + "name": "sla", + "value": "default" + }], + "token_life_span": 100, + "is_default": 1 + }], + "issuer_whitelist": [] + }, + permission=(app, Permission.ACTIVE)) + + right.push_action( + "upsertright", + { + "owner": app, + "right_name": "apimarket.manager.licenseApi3", + "urls": [{ + "base_right": "", + "url": " ore://manager.apim/action/licenseapi", + "method": "post", + "matches_params": [{ + "name": "sla", + "value": "default" + }], + "token_life_span": 100, + "is_default": 1 + }], + "issuer_whitelist": [] + }, + permission=(app, Permission.ACTIVE)) + + def test_04(self): + COMMENT(''' + Mint: + ''') + + instr.push_action( + "mint", + { + "minter": app, + "owner": app, + "instrument": { + "issuer": app, + "instrument_class": "sample_class", + "description": "sample_description", + "instrument_template": "sample_template", + "security_type": "", + "parameter_rules": [], + "rights": [{ + "right_name": "apimarket.manager.licenseApi", + "description": "licenser", + "price_in_cpu": "10", + "additional_url_params": [] + }, + { + "right_name": "apimarket.manager.licenseApi2", + "description": "licenser", + "price_in_cpu": "10", + "additional_url_params": [] + }], + "parent_instrument_id": 0, + "data": [], + "encrypted_by": "", + "mutability": 2 + }, + "start_time": 0, + "end_time": 0, + "instrumentId": 0 + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): # Instrument id exists + instr.push_action( + "mint", + { + "minter": app, + "owner": app, + "instrument": { + "issuer": app, + "instrument_class": "sample_class", + "description": "sample_description", + "instrument_template": "", + "security_type": "", + "parameter_rules": [], + "rights": [{ + "right_name": "apimarket.manager.licenseApi", + "description": "licenser", + "price_in_cpu": "10", + "additional_url_params": [] + }], + "parent_instrument_id": 0, + "data": [], + "encrypted_by": "", + "mutability": 2 + }, + "start_time": 0, + "end_time": 0, + "instrumentId": 1 + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): # Owner account doesnt exists + instr.push_action( + "mint", + { + "minter": app, + "owner": "notexists", + "instrument": { + "issuer": app, + "instrument_class": "sample_class", + "description": "sample_description", + "instrument_template": "", + "security_type": "", + "parameter_rules": [], + "rights": [{ + "right_name": "apimarket.manager.licenseApi", + "description": "licenser", + "price_in_cpu": "10", + "additional_url_params": [] + }], + "parent_instrument_id": 0, + "data": [], + "encrypted_by": "", + "mutability": 2 + }, + "start_time": 0, + "end_time": 0, + "instrumentId": 0 + }, + permission=(app, Permission.ACTIVE)) + + def test_05(self): + COMMENT(''' + Create Instrument: + ''') + + instr.push_action( + "createinst", + { + "minter": app, + "owner": app, + "instrumentId": 2, + "instrument": { + "issuer": app, + "instrument_class": "sample_class", + "description": "sample_description", + "instrument_template": "", + "security_type": "", + "parameter_rules": [], + "rights": [{ + "right_name": "apimarket.manager.licenseApi", + "description": "licenser", + "price_in_cpu": "10", + "additional_url_params": [] + }], + "parent_instrument_id": 0, + "data": [], + "encrypted_by": "", + "mutability": 2 + }, + "start_time": 0, + "end_time": 0 + }, + permission=(instr, Permission.ACTIVE)) + + instr.push_action( + "createinst", + { + "minter": app, + "owner": app, + "instrumentId": 5, + "instrument": { + "issuer": app, + "instrument_class": "sample_class", + "description": "sample_description", + "instrument_template": "", + "security_type": "", + "parameter_rules": [], + "rights": [{ + "right_name": "apimarket.manager.licenseApi", + "description": "licenser", + "price_in_cpu": "10", + "additional_url_params": [] + }], + "parent_instrument_id": 0, + "data": [], + "encrypted_by": "", + "mutability": 2 + }, + "start_time": 0, + "end_time": 0 + }, + permission=(instr, Permission.ACTIVE)) + + + def test_06(self): + COMMENT(''' + Update Instrument: + ''') + time.sleep(3) + instr.push_action( + "createinst", + { + "minter": app, + "owner": app, + "instrumentId": 2, + "instrument": { + "issuer": app, + "instrument_class": "sample_class", + "description": "sample_description", + "instrument_template": "", + "security_type": "", + "parameter_rules": [], + "rights": [{ + "right_name": "apimarket.manager.licenseApi", + "description": "licenser", + "price_in_cpu": "10", + "additional_url_params": [] + }], + "parent_instrument_id": 0, + "data": [], + "encrypted_by": "", + "mutability": 2 + }, + "start_time": 0, + "end_time": 0 + }, + permission=(instr, Permission.ACTIVE)) + + + def test_07(self): + COMMENT(''' + Check Rights: + ''') + + instr.push_action( + "mint", + { + "minter": app, + "owner": app, + "instrument": { + "issuer": app, + "instrument_class": "class", + "description": "sample_description", + "instrument_template": "", + "security_type": "", + "parameter_rules": [], + "rights": [{ + "right_name": "apimarket.manager.licenseApi3", + "description": "licenser", + "price_in_cpu": "10", + "additional_url_params": [] + }], + "parent_instrument_id": 0, + "data": [], + "encrypted_by": "", + "mutability": 2 + }, + "start_time": 0, + "end_time": 0, + "instrumentId": 3 + }, + permission=(app, Permission.ACTIVE)) + + instr.push_action( + "checkright", + { + "minter": app, + "issuer": app, + "rightname": "apimarket.manager.licenseApi", + "deferred_transaction_id": 10 + }, + permission=(instr, Permission.ACTIVE)) + + with self.assertRaises(Error): # Right doesn't exist + instr.push_action( + "checkright", + { + "minter": app, + "issuer": app, + "rightname": "nonexistent.right", + "deferred_transaction_id": 0 + }, + permission=(instr, Permission.ACTIVE)) + + with self.assertRaises(Error): # minter neither owns the right nor whitelisted for the right + instr.push_action( + "checkright", + { + "minter": "ownerfails", + "issuer": app, + "rightname": "apimarket.manager.licenseApi", + "deferred_transaction_id": 0 + }, + permission=(instr, Permission.ACTIVE)) + + with self.assertRaises(Error): # instrument issuer neither holds the right nor whitelisted for the right + instr.push_action( + "checkright", + { + "minter": "minter", + "issuer": "issuerfails", + "rightname": "apimarket.manager.licenseApi", + "deferred_transaction_id": 0 + }, + permission=(instr, Permission.ACTIVE)) + + def test_08(self): + COMMENT(''' + Revoke: + ''') + + instr.push_action( + "mint", + { + "minter": app, + "owner": app, + "instrument": { + "issuer": app, + "instrument_class": "class", + "description": "sample_description", + "instrument_template": "", + "security_type": "", + "parameter_rules": [], + "rights": [{ + "right_name": "apimarket.manager.licenseApi3", + "description": "licenser", + "price_in_cpu": "10", + "additional_url_params": [] + }], + "parent_instrument_id": 0, + "data": [], + "encrypted_by": "", + "mutability": 2 + }, + "start_time": 0, + "end_time": 0, + "instrumentId": 4 + }, + permission=(app, Permission.ACTIVE)) + + instr.push_action( + "revoke", + { + "revoker": app, + "token_id": 5 + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #token doesn't exist + instr.push_action( + "revoke", + { + "revoker": app, + "token_id": 70 + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): # The revoker account doesn't have authority to revoke the instrument + instr.push_action( + "revoke", + { + "revoker": right, + "token_id": 4 + }, + permission=(right, Permission.ACTIVE)) + + with self.assertRaises(Error): # token is already revoked + instr.push_action( + "revoke", + { + "revoker": app, + "token_id": 5 + }, + permission=(app, Permission.ACTIVE)) + + def test_09(self): + COMMENT(''' + Update: + ''') + + instr.push_action( + "update", + { + "updater": app, + "instrument_template": "", + "instrument": { + "issuer": app, + "instrument_class": "sample_class", + "description": "sample_description", + "instrument_template": "", + "security_type": "", + "parameter_rules": [], + "rights": [{ + "right_name": "apimarket.manager.licenseApi", + "description": "licenser", + "price_in_cpu": "10", + "additional_url_params": [] + }], + "parent_instrument_id": 0, + "data": [], + "encrypted_by": "", + "mutability": 2 + }, + "instrument_id": 2, + "start_time": 0, + "end_time": 0 + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #Updater acccount doesn't have the authority to change start/edd time of the instrument + instr.push_action( + "update", + { + "updater": right, + "instrument_template": "", + "instrument": { + "issuer": app, + "instrument_class": "sample_class", + "description": "sample_description", + "instrument_template": "", + "security_type": "", + "parameter_rules": [], + "rights": [{ + "right_name": "apimarket.manager.licenseApi", + "description": "licenser", + "price_in_cpu": "10", + "additional_url_params": [] + }], + "parent_instrument_id": 0, + "data": [], + "encrypted_by": "", + "mutability": 2 + }, + "instrument_id": 1, + "start_time": 0, + "end_time": 0 + }, + permission=(right, Permission.ACTIVE)) + + def test_10(self): + COMMENT(''' + Transfer: + ''') + + instr.push_action( + "transfer", + { + "sender": app, + "to": right, + "token_id": 2 + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #Sender account is not allowed to transfer the instrument + instr.push_action( + "transfer", + { + "sender": app, + "to": right, + "token_id": 2 + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #Token doesn't exists + instr.push_action( + "transfer", + { + "sender": app, + "to": right, + "token_id": 99 + }, + permission=(app, Permission.ACTIVE)) + + + # def test_06(self): + # def test_07(self): + # def test_08(self): + + + + + def tearDown(self): + pass + + + @classmethod + def tearDownClass(cls): + stop() + + +if __name__ == "__main__": + unittest.main() \ No newline at end of file diff --git a/tests/instrumenttest.py b/tests/instrumenttest.py deleted file mode 100755 index 6cbbea8..0000000 --- a/tests/instrumenttest.py +++ /dev/null @@ -1,232 +0,0 @@ -# python3 ./tests/instrumenttest.py - -import time -import setup -import sys -import json -import eosf -import node -import unittest -from termcolor import cprint - -setup.set_verbose(True) -setup.set_json(False) -setup.use_keosd(False) -#setup.set_command_line_mode(True) - -class Test1(unittest.TestCase): - - def run(self, result=None): - """ Stop after first error """ - if not result.failures: - super().run(result) - - @classmethod - def setUpClass(cls): - global contractPath - # set this variable to the local path for the contracts folder - contractPath = "/Users/basar/Workspace/ore-protocol/contracts" - - testnet = node.reset() - assert(not testnet.error) - - wallet = eosf.Wallet() - assert(not wallet.error) - - global account_master - account_master = eosf.AccountMaster() - wallet.import_key(account_master) - assert(not account_master.error) - - global test1 - test1 = eosf.account(account_master, name="test1") - wallet.import_key(test1) - assert(not test1.error) - - global test2 - test2 = eosf.account(account_master, name="test2") - wallet.import_key(test2) - assert(not test2.error) - - global app_apim - app_apim = eosf.account(account_master, name="app.apim") - wallet.import_key(app_apim) - assert(not app_apim.error) - - token_deploy = eosf.account(account_master, name="ore.token") - wallet.import_key(token_deploy) - assert(not token_deploy.error) - - instr_deploy = eosf.account(account_master, name="instr.ore") - wallet.import_key(instr_deploy) - assert(not instr_deploy.error) - - rights_deploy = eosf.account(account_master, name="rights.ore") - wallet.import_key(rights_deploy) - assert(not rights_deploy.error) - - - contract_eosio_bios = eosf.Contract( - account_master, "eosio.bios").deploy() - assert(not contract_eosio_bios.error) - - global token_contract - token_contract = eosf.Contract(token_deploy, contractPath+"/ore.standard_token") - assert(not token_contract.error) - - global instr_ore - instr_ore = eosf.Contract(instr_deploy, contractPath+"/ore.instrument") - assert(not instr_ore.error) - - global rights_ore - rights_ore = eosf.Contract(rights_deploy, contractPath+"/ore.rights_registry") - assert(not rights_ore.error) - - - deployment = token_contract.deploy() - assert(not deployment.error) - - deployment = instr_ore.deploy() - assert(not deployment.error) - - deployment = rights_ore.deploy() - assert(not deployment.error) - - - def setUp(self): - pass - - - def test_01(self): - - cprint(""" -OREINST TOKEN TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("OREINST create") - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "create", - '{"issuer":"' - + str(account_master) - + '", "maximum_supply":"100000000.0000 OREINST"}').error) - - cprint(""" -INSTRUMENT CREATE FAIL TEST STARTED - """, 'yellow') - - cprint("instrument contract tries to create a symbol other than OREINST and fails", 'magenta') - self.assertTrue(instr_ore.push_action( - "create", - '{"issuer":"' - + str(account_master) - + '", "maximum_supply":"100000000.0000 TEST"}').error) - - cprint(""" -Action contract.push_action("OREINST issue") - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "issue", - '{"to":"' + 'instr.ore' - + '", "quantity":"10000000.0000 OREINST", "memo": "OREINST token issued"}', - account_master).error) - - - - def test_02(self): - - cprint(""" -RIGHT SET ACTION TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("upsertright", app_apim) - """, 'magenta') - self.assertFalse(rights_ore.push_action( - "upsertright", - '{"issuer":"' + 'app.apim' - + '","right_name":"cloud.hadron.contest-2018-07","urls":[{"url":"https://contest-hadron-dot-partner-aikon.appspot.com/contest-1","method":"get","matches_params":[],"token_life_span":100,"is_default":1}],"issuer_whitelist":["app.apim"]}' - , app_apim).error) - - def test_03(self): - - cprint(""" -INSTRUMENT MINT TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("mint", app_apim) - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "mint", - '{"minter":"' + 'app.apim' - + '","owner":"' + 'app.apim' - +'","instrument":'+ '{"issuer":"app.apim", "instrument_class":"class", "description":"description", "instrument_template":"template", "security_type":"security",' - + '"rights":[], "parent_instrument_id":"0", "data":[],' - + '"start_time":"0", "end_time":"0"}' - + ',"instrumentId":' + '0' - + '}' - , app_apim).error) - cprint(""" -Assign t1 = instr_ore.table("tokens", "tokens") - """, 'green') - t1 = instr_ore.table("tokens", "instr.ore") - - cprint(""" -Get the OREINST balance as 1.0000 ORE from the accounts table for app.apim) - """,'green') - t2 = instr_ore.table("accounts","app.apim") - - def test_04(self): - - cprint(""" -INSTRUMENT TRANSFER TESTS STARTED - """, 'yellow') - - self.assertFalse(instr_ore.push_action( - "transfer", - '{"sender":"app.apim", "to":"test1", "token_id":0}', app_apim).error) - t3 = instr_ore.table("accounts","app.apim") - t4 = instr_ore.table("accounts","test1") - def test_05(self): - - cprint(""" -INSTRUMENT APPROVE TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("approve", app_apim) - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "approve", - '{"from":"' + 'test1' - + '","to":"' + 'test2' - +'","token_id":'+ '0' - + '}' - , test1).error) - - def test_06(self): - cprint(""" -INSTRUMENT TRANSFERFROM TESTS STARTED - """, 'yellow') - def test_07(self): - cprint(""" -INSTRUMENT BURN TESTS STARTED - """, 'yellow') - - def test_07(self): - cprint(""" -INSTRUMENT BURNFROM TESTS STARTED - """, 'yellow') - def tearDown(self): - pass - - - @classmethod - def tearDownClass(cls): - node.stop() - - -if __name__ == "__main__": - unittest.main() \ No newline at end of file diff --git a/tests/managertest.py b/tests/managertest.py deleted file mode 100644 index 8ebd1f2..0000000 --- a/tests/managertest.py +++ /dev/null @@ -1,236 +0,0 @@ -# python3 ./tests/instrumenttest.py - -import time -import setup -import sys -import json -import eosf -import node -import unittest -from termcolor import cprint - -setup.set_verbose(True) -setup.set_json(False) -setup.use_keosd(False) -#setup.set_command_line_mode(True) - -class Test1(unittest.TestCase): - - def run(self, result=None): - """ Stop after first error """ - if not result.failures: - super().run(result) - - @classmethod - def setUpClass(cls): - global contractPath - # set this variable to the local path for the contracts folder - contractPath = "/Users/basar/Workspace/ore-protocol/contracts" - - testnet = node.reset() - assert(not testnet.error) - - wallet = eosf.Wallet() - assert(not wallet.error) - - global account_master - account_master = eosf.AccountMaster() - wallet.import_key(account_master) - assert(not account_master.error) - - global test1 - test1 = eosf.account(account_master, name="test1") - wallet.import_key(test1) - assert(not test1.error) - - global test2 - test2 = eosf.account(account_master, name="test2") - wallet.import_key(test2) - assert(not test2.error) - - global app_apim - app_apim = eosf.account(account_master, name="app.apim") - wallet.import_key(app_apim) - assert(not app_apim.error) - - token_deploy = eosf.account(account_master, name="ore.token") - wallet.import_key(token_deploy) - assert(not token_deploy.error) - - instr_deploy = eosf.account(account_master, name="instr.ore") - wallet.import_key(instr_deploy) - assert(not instr_deploy.error) - - rights_deploy = eosf.account(account_master, name="rights.ore") - wallet.import_key(rights_deploy) - assert(not rights_deploy.error) - - rights_deploy = eosf.account(account_master, name="rights.ore") - wallet.import_key(rights_deploy) - assert(not rights_deploy.error) - - - contract_eosio_bios = eosf.Contract( - account_master, "eosio.bios").deploy() - assert(not contract_eosio_bios.error) - - global token_contract - token_contract = eosf.Contract(token_deploy, contractPath+"/ore.standard_token") - assert(not token_contract.error) - - global instr_ore - instr_ore = eosf.Contract(instr_deploy, contractPath+"/ore.instrument") - assert(not instr_ore.error) - - global rights_ore - rights_ore = eosf.Contract(rights_deploy, contractPath+"/ore.rights_registry") - assert(not rights_ore.error) - - - deployment = token_contract.deploy() - assert(not deployment.error) - - deployment = instr_ore.deploy() - assert(not deployment.error) - - deployment = rights_ore.deploy() - assert(not deployment.error) - - - def setUp(self): - pass - - - def test_01(self): - - cprint(""" -OREINST TOKEN TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("OREINST create") - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "create", - '{"issuer":"' - + str(account_master) - + '", "maximum_supply":"100000000.0000 OREINST"}').error) - - cprint(""" -INSTRUMENT CREATE FAIL TEST STARTED - """, 'yellow') - - cprint("instrument contract tries to create a symbol other than OREINST and fails", 'magenta') - self.assertTrue(instr_ore.push_action( - "create", - '{"issuer":"' - + str(account_master) - + '", "maximum_supply":"100000000.0000 TEST"}').error) - - cprint(""" -Action contract.push_action("OREINST issue") - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "issue", - '{"to":"' + 'instr.ore' - + '", "quantity":"10000000.0000 OREINST", "memo": "OREINST token issued"}', - account_master).error) - - - - def test_02(self): - - cprint(""" -RIGHT SET ACTION TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("upsertright", app_apim) - """, 'magenta') - self.assertFalse(rights_ore.push_action( - "upsertright", - '{"issuer":"' + 'app.apim' - + '","right_name":"cloud.hadron.contest-2018-07","urls":[{"url":"https://contest-hadron-dot-partner-aikon.appspot.com/contest-1","method":"get","matches_params":[],"token_life_span":100,"is_default":1}],"issuer_whitelist":["app.apim"]}' - , app_apim).error) - - def test_03(self): - - cprint(""" -INSTRUMENT MINT TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("mint", app_apim) - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "mint", - '{"minter":"' + 'app.apim' - + '","owner":"' + 'app.apim' - +'","instrument":'+ '{"issuer":"app.apim", "instrument_class":"class", "description":"description", "instrument_template":"template", "security_type":"security",' - + '"rights":[], "parent_instrument_id":"0", "data":[],' - + '"start_time":"0", "end_time":"0"}' - + ',"instrumentId":' + '0' - + '}' - , app_apim).error) - cprint(""" -Assign t1 = instr_ore.table("tokens", "tokens") - """, 'green') - t1 = instr_ore.table("tokens", "instr.ore") - - cprint(""" -Get the OREINST balance as 1.0000 ORE from the accounts table for app.apim) - """,'green') - t2 = instr_ore.table("accounts","app.apim") - - def test_04(self): - - cprint(""" -INSTRUMENT TRANSFER TESTS STARTED - """, 'yellow') - - self.assertFalse(instr_ore.push_action( - "transfer", - '{"sender":"app.apim", "to":"test1", "token_id":0}', app_apim).error) - t3 = instr_ore.table("accounts","app.apim") - t4 = instr_ore.table("accounts","test1") - def test_05(self): - - cprint(""" -INSTRUMENT APPROVE TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("approve", app_apim) - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "approve", - '{"from":"' + 'test1' - + '","to":"' + 'test2' - +'","token_id":'+ '0' - + '}' - , test1).error) - - def test_06(self): - cprint(""" -INSTRUMENT TRANSFERFROM TESTS STARTED - """, 'yellow') - def test_07(self): - cprint(""" -INSTRUMENT BURN TESTS STARTED - """, 'yellow') - - def test_07(self): - cprint(""" -INSTRUMENT BURNFROM TESTS STARTED - """, 'yellow') - def tearDown(self): - pass - - - @classmethod - def tearDownClass(cls): - node.stop() - - -if __name__ == "__main__": - unittest.main() \ No newline at end of file diff --git a/tests/migration.py b/tests/migration.py deleted file mode 100644 index f0362f0..0000000 --- a/tests/migration.py +++ /dev/null @@ -1,239 +0,0 @@ -# python3 ./tests/instrumenttest.py - -import time -import setup -import sys -import json -import eosf -import node -import unittest -from termcolor import cprint - -setup.set_verbose(True) -setup.set_json(False) -setup.use_keosd(False) -#setup.set_command_line_mode(True) - -class Test1(unittest.TestCase): - - def run(self, result=None): - """ Stop after first error """ - if not result.failures: - super().run(result) - - @classmethod - def setUpClass(cls): - global contractPath - # set this variable to the local path for the contracts folder - contractPath = "/Users/basar/Workspace/ore-protocol/contracts" - - testnet = node.reset() - assert(not testnet.error) - - wallet = eosf.Wallet() - assert(not wallet.error) - - global account_master - account_master = eosf.AccountMaster() - wallet.import_key(account_master) - assert(not account_master.error) - - global test1 - test1 = eosf.account(account_master, name="test1") - wallet.import_key(test1) - assert(not test1.error) - - global test2 - test2 = eosf.account(account_master, name="test2") - wallet.import_key(test2) - assert(not test2.error) - - global app_apim - app_apim = eosf.account(account_master, name="app.apim") - wallet.import_key(app_apim) - assert(not app_apim.error) - - token_deploy = eosf.account(account_master, name="ore.token") - wallet.import_key(token_deploy) - assert(not token_deploy.error) - - instrold_deploy = eosf.account(account_master, name="instr.old") - wallet.import_key(instrold_deploy) - assert(not instrold_deploy.error) - - instr_deploy = eosf.account(account_master, name="instr.ore") - wallet.import_key(instr_deploy) - assert(not instr_deploy.error) - - rights_deploy = eosf.account(account_master, name="rights.ore") - wallet.import_key(rights_deploy) - assert(not rights_deploy.error) - - - contract_eosio_bios = eosf.Contract( - account_master, "eosio.bios").deploy() - assert(not contract_eosio_bios.error) - - global token_contract - token_contract = eosf.Contract(token_deploy, contractPath+"/ore.standard_token") - assert(not token_contract.error) - - global instr_ore - instr_ore = eosf.Contract(instr_deploy, contractPath+"/old.instrument") - assert(not instr_ore.error) - - instr_ore = eosf.Contract(instr_deploy, contractPath+"/ore.instrument") - assert(not instr_ore.error) - - global rights_ore - rights_ore = eosf.Contract(rights_deploy, contractPath+"/ore.rights_registry") - assert(not rights_ore.error) - - - deployment = token_contract.deploy() - assert(not deployment.error) - - deployment = instr_ore.deploy() - assert(not deployment.error) - - deployment = rights_ore.deploy() - assert(not deployment.error) - - - def setUp(self): - pass - - - def test_01(self): - - cprint(""" -OREINST TOKEN TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("OREINST create") - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "create", - '{"issuer":"' - + str(account_master) - + '", "maximum_supply":"100000000.0000 OREINST"}').error) - - cprint(""" -INSTRUMENT CREATE FAIL TEST STARTED - """, 'yellow') - - cprint("instrument contract tries to create a symbol other than OREINST and fails", 'magenta') - self.assertTrue(instr_ore.push_action( - "create", - '{"issuer":"' - + str(account_master) - + '", "maximum_supply":"100000000.0000 TEST"}').error) - - cprint(""" -Action contract.push_action("OREINST issue") - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "issue", - '{"to":"' + 'instr.ore' - + '", "quantity":"10000000.0000 OREINST", "memo": "OREINST token issued"}', - account_master).error) - - - - def test_02(self): - - cprint(""" -RIGHT SET ACTION TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("upsertright", app_apim) - """, 'magenta') - self.assertFalse(rights_ore.push_action( - "upsertright", - '{"issuer":"' + 'app.apim' - + '","right_name":"cloud.hadron.contest-2018-07","urls":[{"url":"https://contest-hadron-dot-partner-aikon.appspot.com/contest-1","method":"get","matches_params":[],"token_life_span":100,"is_default":1}],"issuer_whitelist":["app.apim"]}' - , app_apim).error) - - def test_03(self): - - cprint(""" -INSTRUMENT MINT TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("mint", app_apim) - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "mint", - '{"minter":"' + 'app.apim' - + '","owner":"' + 'app.apim' - +'","instrument":'+ '{"issuer":"app.apim", "instrument_class":"class", "description":"description", "instrument_template":"template", "security_type":"security",' - + '"rights":[], "parent_instrument_id":"0", "data":[],' - + '"start_time":"0", "end_time":"0"}' - + ',"instrumentId":' + '0' - + '}' - , app_apim).error) - cprint(""" -Assign t1 = instr_ore.table("tokens", "tokens") - """, 'green') - t1 = instr_ore.table("tokens", "instr.ore") - - cprint(""" -Get the OREINST balance as 1.0000 ORE from the accounts table for app.apim) - """,'green') - t2 = instr_ore.table("accounts","app.apim") - - def test_04(self): - - cprint(""" -INSTRUMENT TRANSFER TESTS STARTED - """, 'yellow') - - self.assertFalse(instr_ore.push_action( - "transfer", - '{"sender":"app.apim", "to":"test1", "token_id":0}', app_apim).error) - t3 = instr_ore.table("accounts","app.apim") - t4 = instr_ore.table("accounts","test1") - def test_05(self): - - cprint(""" -INSTRUMENT APPROVE TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("approve", app_apim) - """, 'magenta') - self.assertFalse(instr_ore.push_action( - "approve", - '{"from":"' + 'test1' - + '","to":"' + 'test2' - +'","token_id":'+ '0' - + '}' - , test1).error) - - def test_06(self): - cprint(""" -INSTRUMENT TRANSFERFROM TESTS STARTED - """, 'yellow') - def test_07(self): - cprint(""" -INSTRUMENT BURN TESTS STARTED - """, 'yellow') - - def test_07(self): - cprint(""" -INSTRUMENT BURNFROM TESTS STARTED - """, 'yellow') - def tearDown(self): - pass - - - @classmethod - def tearDownClass(cls): - node.stop() - - -if __name__ == "__main__": - unittest.main() \ No newline at end of file diff --git a/tests/mint.py b/tests/mint.py deleted file mode 100755 index 49d1db4..0000000 --- a/tests/mint.py +++ /dev/null @@ -1,233 +0,0 @@ -# python3 ./tests/mint.py - -import setup -import eosf -import node -import unittest -from termcolor import cprint - -setup.set_verbose(True) -setup.set_json(False) -setup.use_keosd(False) - -class Test1(unittest.TestCase): - - def run(self, result=None): - """ Stop after first error """ - if not result.failures: - super().run(result) - - - @classmethod - def setUpClass(cls): - global contractPath - # set this variable to the local path for the contracts folder - contractPath = "" - - - testnet = node.reset() - assert(not testnet.error) - - wallet = eosf.Wallet() - assert(not wallet.error) - - global account_master - account_master = eosf.AccountMaster() - wallet.import_key(account_master) - assert(not account_master.error) - - global apim - apim = eosf.account(account_master, name="apim") - wallet.import_key(apim) - assert(not apim.error) - - global test1 - test1 = eosf.account(apim, name="test1.apim") - wallet.import_key(test1) - assert(not test1.error) - - global test2 - test2 = eosf.account(apim, name="test2.apim") - wallet.import_key(test2) - assert(not test2.error) - - global manager_apim - manager_apim = eosf.account(apim, name="manager.apim") - wallet.import_key(manager_apim) - assert(not manager_apim.error) - - global app_apim - app_apim = eosf.account(apim, name="app.apim") - wallet.import_key(app_apim) - assert(not app_apim.error) - - global aikon_apim - aikon_apim = eosf.account(apim, name="aikon.apim") - wallet.import_key(aikon_apim) - assert(not aikon_apim.error) - - global ore - ore = eosf.account(account_master, name="ore") - wallet.import_key(ore) - assert(not ore.error) - - global token_ore - token_ore = eosf.account(ore, name="token.ore") - wallet.import_key(token_ore) - assert(not token_ore.error) - - global instr_ore - instr_ore = eosf.account(ore, name="instr.ore") - wallet.import_key(instr_ore) - assert(not instr_ore.error) - - global rights_ore - rights_ore = eosf.account(ore, name="rights.ore") - wallet.import_key(rights_ore) - assert(not rights_ore.error) - - global usage_log_ore - usage_log_ore = eosf.account(ore, name="usagelog.ore") - wallet.import_key(usage_log_ore) - assert(not usage_log_ore.error) - - contract_eosio_bios = eosf.Contract( - account_master, "eosio.bios").deploy() - assert(not contract_eosio_bios.error) - - global token_contract - token_contract = eosf.Contract(token_ore, contractPath+"/ore.standard_token") - assert(not token_contract.error) - - global instr_contract - instr_contract = eosf.Contract(instr_ore, contractPath+"/ore.instrument") - assert(not instr_contract.error) - - global rights_contract - rights_contract = eosf.Contract(rights_ore, contractPath+"/ore.rights_registry") - assert(not rights_contract.error) - - global usagelog_contract - usagelog_contract = eosf.Contract(usage_log_ore, contractPath+"/ore.usage_log") - assert(not usagelog_contract.error) - - global managerapim_contract - managerapim_contract = eosf.Contract(manager_apim, contractPath+"/apim.manager") - assert(not managerapim_contract.error) - - deployment = token_contract.deploy() - assert(not deployment.error) - - deployment = instr_contract.deploy() - assert(not deployment.error) - - deployment = rights_contract.deploy() - assert(not deployment.error) - - deployment = usagelog_contract.deploy() - assert(not deployment.error) - - deployment = managerapim_contract.deploy() - assert(not deployment.error) - - - def setUp(self): - pass - - - def test_01(self): - - cprint(""" -TOKEN CONTRACT TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("CPU create") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "create", - '{"issuer":"' - + str(account_master) - + '", "maximum_supply":"100000000.0000 CPU"}').error) - - cprint(""" -Action contract.push_action("CPU issue") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "issue", - '{"to":"' + str(app_apim) - + '", "quantity":"10000000.0000 CPU", "memo": "CPU token issued"}', - account_master).error) - - cprint(""" -Action contract.push_action("ORE create") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "create", - '{"issuer":"' - + str(account_master) - + '", "maximum_supply":"100000000.0000 ORE"}').error) - - cprint(""" -Action contract.push_action("ORE issue") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "issue", - '{"to":"' + str(app_apim) - + '", "quantity":"10000000.0000 ORE", "memo": "ORE token issued"}', - account_master).error) - - cprint(""" -Action contract.push_action("OREINST create") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "create", - '{"issuer":"' - + str(account_master) - + '", "maximum_supply":"100000000.0000 OREINST"}').error) - - cprint(""" -Action contract.push_action("OREINST issue") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "issue", - '{"to":"' + str(app_apim) - + '", "quantity":"10000000.0000 OREINST", "memo": "OREINST token issued"}', - account_master, output=True).error) - - def test_02(self): - - cprint(""" -APP APIM ACTIONS TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("upsertright", app_apim) - """, 'magenta') - self.assertFalse(rights_contract.push_action( - "upsertright", - '{"issuer":"' + str(app_apim) - + '","right_name":"cloud.hadron.contest-2018-07","urls":[{"url":"https://contest-hadron-dot-partner-aikon.appspot.com/contest-1","method":"get","matches_params":[],"token_life_span":100,"is_default":1}],"issuer_whitelist":["app.apim"]}' - , app_apim, output=True).error) - - - - cprint(""" -Assign t1 = rights_ore.table("rights.ore", "rights.ore") - """, 'green') - t2 = rights_contract.table("rights", "rights.ore") - - - - def tearDown(self): - pass - - - @classmethod - def tearDownClass(cls): - #node.stop() - pass - - -if __name__ == "__main__": - unittest.main() \ No newline at end of file diff --git a/tests/rights_registry.py b/tests/rights_registry.py new file mode 100644 index 0000000..114f4a0 --- /dev/null +++ b/tests/rights_registry.py @@ -0,0 +1,117 @@ +import unittest +from eosfactory.eosf import * + +verbosity([Verbosity.INFO, Verbosity.OUT, Verbosity.TRACE, Verbosity.DEBUG]) + +class Test(unittest.TestCase): + + def run(self, result=None): + super().run(result) + + + @classmethod + def setUpClass(cls): + SCENARIO(''' + Create a contract from template, then build and deploy it. + ''') + reset() + create_wallet() + create_master_account("master") + + COMMENT(''' + Create test accounts: + ''') + create_account("app", master) + + + def setUp(self): + pass + + + def test_01(self): + COMMENT(''' + Create, build and deploy the contracts: + ''') + + create_account("right", master) + right_contract = Contract(right, "/root/ore-protocol/contracts/ore.rights_registry") + right_contract.build() + right_contract.deploy() + + def test_02(self): + COMMENT(''' + Register rights: + ''') + + right.push_action( + "upsertright", + { + "owner": app, + "right_name": "apimarket.manager.licenseApi", + "urls": [{ + "base_right": "", + "url": " ore://manager.apim/action/licenseapi", + "method": "post", + "matches_params": [{ + "name": "sla", + "value": "default" + }], + "token_life_span": 100, + "is_default": 1 + }], + "issuer_whitelist": ["app.apim"] + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #You are not the issuer of the existing contract. Update canceled. + right.push_action( + "upsertright", + { + "owner": app, + "right_name": "apimarket.manager.licenseApi", + "urls": [{ + "base_right": "", + "url": " ore://manager.apim/action/licenseapi", + "method": "post", + "matches_params": [{ + "name": "sla", + "value": "default" + }], + "token_life_span": 100, + "is_default": 1 + }], + "issuer_whitelist": ["app.apim"] + }, + permission=(app, Permission.ACTIVE)) + + right.push_action( + "upsertright", + { + "owner": app, + "right_name": "apimarket.manager.licenseApi2", + "urls": [{ + "base_right": "", + "url": " ore://manager.apim/action/licenseapi", + "method": "post", + "matches_params": [{ + "name": "sla", + "value": "default" + }], + "token_life_span": 100, + "is_default": 1 + }], + "issuer_whitelist": ["app.apim"] + }, + permission=(app, Permission.ACTIVE)) + + def tearDown(self): + pass + + + @classmethod + def tearDownClass(cls): + stop() + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/rightstest.py b/tests/rightstest.py deleted file mode 100755 index 20c6f5c..0000000 --- a/tests/rightstest.py +++ /dev/null @@ -1,143 +0,0 @@ -# python3 ./tests/rightstest.py - -import time -import setup -import eosf -import node -import unittest -from termcolor import cprint - -setup.set_verbose(True) -setup.set_json(False) -setup.use_keosd(False) -#setup.set_command_line_mode(True) - -class Test1(unittest.TestCase): - - def run(self, result=None): - """ Stop after first error """ - if not result.failures: - super().run(result) - - - @classmethod - def setUpClass(cls): - global contractPath - # set this variable to the local path for the contracts folder - contractPath = "/Users/basar/Workspace/ore-protocol/contracts" - - testnet = node.reset() - assert(not testnet.error) - - wallet = eosf.Wallet() - assert(not wallet.error) - - global account_master - account_master = eosf.AccountMaster() - wallet.import_key(account_master) - assert(not account_master.error) - - global test1 - test1 = eosf.account(account_master, name="test1") - wallet.import_key(test1) - assert(not test1.error) - - global test2 - test2 = eosf.account(account_master, name="test2") - wallet.import_key(test2) - assert(not test2.error) - - global test3 - test3 = eosf.account(account_master, name="test3") - wallet.import_key(test3) - assert(not test3.error) - - rights_deploy = eosf.account(account_master, name="rights.ore") - wallet.import_key(rights_deploy) - assert(not rights_deploy.error) - - contract_eosio_bios = eosf.Contract( - account_master, "eosio.bios").deploy() - assert(not contract_eosio_bios.error) - - global rights_ore - rights_ore = eosf.Contract(rights_deploy, contractPath+"/ore.rights_registry") - assert(not rights_ore.error) - - - deployment = rights_ore.deploy() - assert(not deployment.error) - - - def setUp(self): - pass - - - def test_01(self): - - cprint(""" -RIGHT REGISTRY TEST STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("upsertright", app_apim) - """, 'magenta') - self.assertFalse(rights_ore.push_action( - "upsertright", - '{"issuer":"' + 'test1' - + '","right_name":"TestRight1","urls":[{"url":"https://url/sample","method":"get","matches_params":[],"token_life_span":100,"is_default":1}],"issuer_whitelist":["test1"]}' - , test1, output=True).error) - - cprint(""" -Assign t1 = rights_ore.table("rights.ore", "rights.ore") - """, 'green') - t1 = rights_ore.table("rights", "rights.ore") - - - cprint(""" -RIGHT UDPDATE TEST STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("upsertright", app_apim) - """, 'magenta') - self.assertFalse(rights_ore.push_action( - "upsertright", - '{"issuer":"' + 'test1' - + '","right_name":"TestRight1","urls":[{"url":"https://url/edited1","method":"get","matches_params":[],"token_life_span":100,"is_default":1}],"issuer_whitelist":["test1", "test2"]}' - , test1, output=True).error) - - cprint(""" -Assign t1 = rights_ore.table("rights.ore", "rights.ore") - """, 'green') - t2 = rights_ore.table("rights", "rights.ore") - - - - cprint(""" -RIGHT UPDATE FAIL TEST STARTED - """, 'yellow') - - cprint("test2 account tries to update TestRight1, which is issued by test1", 'magenta') - self.assertTrue(rights_ore.push_action( - "upsertright", - '{"issuer":"' + 'test2' - + '","right_name":"TestRight1","urls":[{"url":"https://url/edited2","method":"get","matches_params":[],"token_life_span":100,"is_default":1}],"issuer_whitelist":["test1", "test2", "test3"]}' - , test2, output=True).error) - - cprint(""" -Assign t1 = rights_ore.table("rights.ore", "rights.ore") - """, 'green') - t3 = rights_ore.table("rights", "rights.ore") - - def tearDown(self): - pass - - - @classmethod - def tearDownClass(cls): - node.stop() - - -if __name__ == "__main__": - unittest.main() \ No newline at end of file diff --git a/tests/setup.py b/tests/setup.py new file mode 100644 index 0000000..e98a33f --- /dev/null +++ b/tests/setup.py @@ -0,0 +1,210 @@ +import unittest +from eosfactory.eosf import * + +verbosity([Verbosity.INFO, Verbosity.OUT, Verbosity.TRACE, Verbosity.DEBUG]) + +STANDARD_TOKEN = "~/Workspace/testeos/contracts/ore.standard_token/" +RIGHTS_REGISTRY = "~/Workspace/ore-protocol/contracts/ore.rights_registry/" +INSTRUMENT = "~/Workspace/ore-protocol/contracts/ore.instrument/" +USAGE_LOG = "~/Workspace/ore-protocol/contracts/ore.usage_log/" +APIM_MANAGER = "~/Workspace/ore-protocol/contracts/apim.manager/" + +class Test(unittest.TestCase): + + def run(self, result=None): + super().run(result) + + + @classmethod + def setUpClass(cls): + SCENARIO(''' + Create a contract from template, then build and deploy it. + ''') + reset() + create_wallet() + create_master_account("master") + + COMMENT(''' + Create test accounts: + ''') + create_account("app", master) + + + def setUp(self): + pass + + + def test_01(self): + COMMENT(''' + Create, build and deploy the contracts: + ''') + create_account("token", master) + token_contract = Contract(token, "ore.standard_token") + token_contract.build() + token_contract.deploy() + + create_account("right", master) + right_contract = Contract(right, "ore.rights_registry") + right_contract.build() + right_contract.deploy() + + create_account("instr", master) + instr_contract = Contract(instr, "ore.instrument") + instr_contract.build() + instr_contract.deploy() + + create_account("apim", master) + apim_contract = Contract(apim, "apim.manager") + apim_contract.build() + apim_contract.deploy() + + create_account("usage", master) + usage_contract = Contract(usage, "ore.usage_log") + usage_contract.build() + usage_contract.deploy() + + # token_contract.delete() + # right_contract.delete() + # instr_contract.delete() + # apim_contract.delete() + # usage_contract.delete() + + def test_02(self): + COMMENT(''' + Create and issue tokens: + ''') + + token.push_action( + "create", + { + "issuer": token, + "maximum_supply": "100000000.0000 CPU" + }, + permission=(token, Permission.ACTIVE)) + + token.push_action( + "create", + { + "issuer": token, + "maximum_supply": "100000000.0000 ORE" + }, + permission=(token, Permission.ACTIVE)) + + instr.push_action( + "create", + { + "issuer": instr, + "maximum_supply": "100000000.0000 OREINST" + }, + permission=(instr, Permission.ACTIVE)) + + token.push_action( + "issue", + { + "to": app, + "quantity": "10000000.0000 CPU", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + token.push_action( + "issue", + { + "to": app, + "quantity": "10000000.0000 ORE", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + instr.push_action( + "issue", + { + "to": instr, + "quantity": "10000000.0000 OREINST", + "memo": "" + }, + permission=(instr, Permission.ACTIVE)) + + def test_03(self): + COMMENT(''' + Register rights: + ''') + + right.push_action( + "upsertright", + { + "owner": apim, + "right_name": "apimarket.manager.licenseApi", + "urls": [{ + "base_right": "", + "url": " ore://manager.apim/action/licenseapi", + "method": "post", + "matches_params": [{ + "name": "sla", + "value": "default" + }], + "token_life_span": 100, + "is_default": 1 + }], + "issuer_whitelist": ["app.apim"] + }, + permission=(apim, Permission.ACTIVE)) + + + + def test_04(self): + COMMENT(''' + Publish and license offers: + ''') + with self.assertRaises(Error): + apim.push_action( + "publishapi", + { + "creator":app, + "issuer":app, + "api_voucher_license_price_in_cpu":"0", + "api_voucher_lifetime_in_seconds": "10", + "api_voucher_start_date": "0", + "api_voucher_end_date": "0", + "api_voucher_mutability": "0", + "api_voucher_security_type":"pass", + "api_voucher_valid_forever": "0", + "right_params": [ + { + "right_name": "apimarket.manager.licenseApi", + "right_description":"description", + "right_price_in_cpu":"100", + "api_name":"apis", + "api_description":"desci", + "api_price_in_cpu":"10", + "api_payment_model":"pass", + "api_additional_url_params":"" + } + ], + "api_voucher_parameter_rules":[], + "offer_mutability": 2, + "offer_security_type": "sec", + "offer_template":"", + "offer_start_time": 0, + "offer_end_time":0, + "offer_override_id":0 + }, + permission=(app, Permission.ACTIVE)) + + + def test_05(self): + COMMENT(''' + Check tables: + ''') + + def tearDown(self): + pass + + + @classmethod + def tearDownClass(cls): + stop() + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/standard_token.py b/tests/standard_token.py new file mode 100644 index 0000000..6ca6b6b --- /dev/null +++ b/tests/standard_token.py @@ -0,0 +1,380 @@ +import unittest +from eosfactory.eosf import * + +verbosity([Verbosity.INFO, Verbosity.OUT, Verbosity.TRACE, Verbosity.DEBUG]) + +class Test(unittest.TestCase): + + def run(self, result=None): + super().run(result) + + + @classmethod + def setUpClass(cls): + SCENARIO(''' + Create a contract from template, then build and deploy it. + ''') + reset() + create_wallet() + create_master_account("master") + + COMMENT(''' + Create test accounts: + ''') + create_account("app", master) + create_account("nonapp", master) + + + def setUp(self): + pass + + + def test_01(self): + COMMENT(''' + Create, build and deploy the contracts: + ''') + create_account("token", master) + token_contract = Contract(token, "/root/ore-protocol/contracts/ore.standard_token") + token_contract.build() + token_contract.deploy() + + def test_02(self): + COMMENT(''' + Create tokens: + ''') + + #Valid transaction + token.push_action( + "create", + { + "issuer": token, + "maximum_supply": "100000000.0000 ORE" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Invalid symbol name + token.push_action( + "create", + { + "issuer": token, + "maximum_supply": "100000000.0000 OREEEEEE" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Invalid supply + token.push_action( + "create", + { + "issuer": token, + "maximum_supply": "100000.000000000000000000000000000000 ORA" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Max supply must be positive + token.push_action( + "create", + { + "issuer": token, + "maximum_supply": "-100000000.0000 ORA" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Token symbol already exists + token.push_action( + "create", + { + "issuer": token, + "maximum_supply": "100000000.0000 ORE" + }, + permission=(token, Permission.ACTIVE)) + + + def test_03(self): + COMMENT(''' + Issue tokens: + ''') + #Valid transaction + token.push_action( + "issue", + { + "to": app, + "quantity": "10000000.0000 ORE", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + token.push_action( + "issue", + { + "to": token, + "quantity": "100.0000 ORE", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Invalid symbol name + token.push_action( + "issue", + { + "to": app, + "quantity": "100.0000 OREEEEEE", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Token symbol does not exists + token.push_action( + "issue", + { + "to": app, + "quantity": "100.0000 ORU", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Memo has more than 256 bytes + token.push_action( + "issue", + { + "to": app, + "quantity": "100.0000 ORE", + "memo": "LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Quantity must be positive + token.push_action( + "issue", + { + "to": app, + "quantity": "-100.0000 ORE", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Symbol precision mismatch + token.push_action( + "issue", + { + "to": app, + "quantity": "100.000 ORE", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Quantity exceeds available supply + token.push_action( + "issue", + { + "to": app, + "quantity": "100000000.0000 ORE", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + def test_04(self): + COMMENT(''' + Approve tokens: + ''') + #Valid transaction + token.push_action( + "approve", + { + "from": app, + "to": nonapp, + "quantity": "10.0000 ORE", + "memo": "" + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #Amount being approved is more than the balance of approver account + token.push_action( + "approve", + { + "from": app, + "to": nonapp, + "quantity": "10000001.0000 ORE", + "memo": "" + }, + permission=(app, Permission.ACTIVE)) + + def test_05(self): + COMMENT(''' + Retire tokens: + ''') + #Valid transaction + token.push_action( + "retire", + { + "quantity": "100.0000 ORE", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Invalid symbol name + token.push_action( + "retire", + { + "quantity": "100.0000 OREEEEEE", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Token symbol does not exists + token.push_action( + "retire", + { + "quantity": "100.0000 ORU", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Memo has more than 256 bytes + token.push_action( + "retire", + { + "quantity": "100.0000 ORE", + "memo": "LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Quantity must be positive + token.push_action( + "retire", + { + "quantity": "-100.0000 ORE", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + with self.assertRaises(Error): #Symbol precision mismatch + token.push_action( + "retire", + { + "quantity": "100.000 ORE", + "memo": "" + }, + permission=(token, Permission.ACTIVE)) + + + def test_06(self): + COMMENT(''' + Transfer tokens: + ''') + #Valid Transaction + token.push_action( + "transfer", + { + "from":app, + "to": nonapp, + "quantity": "10.0000 ORE", + "memo": "" + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #Cannot transfer to self + token.push_action( + "transfer", + { + "from":app, + "to": app, + "quantity": "100.0000 ORE", + "memo": "" + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #To account does not exist + token.push_action( + "transfer", + { + "from":app, + "to": "nonexist", + "quantity": "100.0000 ORE", + "memo": "" + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #Memo has more than 256 bytes + token.push_action( + "transfer", + { + "from":app, + "to": nonapp, + "quantity": "100.0000 ORE", + "memo": "LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG" + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #Invalid quantity + token.push_action( + "transfer", + { + "from":app, + "to": nonapp, + "quantity": "A ORE", + "memo": "" + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #Quantity must be positive + + token.push_action( + "transfer", + { + "from":app, + "to": nonapp, + "quantity": "-100.0000 ORE", + "memo": "" + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #Symbol precision mismatch + token.push_action( + "transfer", + { + "from":app, + "to": nonapp, + "quantity": "100.000 ORE", + "memo": "" + }, + permission=(app, Permission.ACTIVE)) + + + def test_07(self): + COMMENT(''' + Transfer From tokens: + ''') + token.push_action( + "transferfrom", + { + "sender": nonapp, + "from":app, + "to": token, + "quantity": "5.0000 ORE", + "memo": "" + }, + permission=(nonapp, Permission.ACTIVE)) + + with self.assertRaises(Error): #The amount being transferred is more than the approved account + token.push_action( + "transferfrom", + { + "sender": nonapp, + "from":app, + "to": token, + "quantity": "6.0000 ORE", + "memo": "" + }, + permission=(nonapp, Permission.ACTIVE)) + + def tearDown(self): + pass + + + @classmethod + def tearDownClass(cls): + stop() + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/tokentest.py b/tests/tokentest.py deleted file mode 100755 index 2ade6b4..0000000 --- a/tests/tokentest.py +++ /dev/null @@ -1,239 +0,0 @@ -# python3 ./tests/mint.py - -import setup -import eosf -import node -import unittest -from termcolor import cprint - -setup.set_verbose(True) -setup.set_json(False) -setup.use_keosd(False) - -class Test1(unittest.TestCase): - - def run(self, result=None): - """ Stop after first error """ - if not result.failures: - super().run(result) - - - @classmethod - def setUpClass(cls): - global contractPath - # set this variable to the local path for the contracts folder - contractPath = "/Users/basar/Workspace/ore-protocol/contracts" - - testnet = node.reset() - assert(not testnet.error) - - wallet = eosf.Wallet() - assert(not wallet.error) - - global account_master - account_master = eosf.AccountMaster() - wallet.import_key(account_master) - assert(not account_master.error) - - global test1 - test1 = eosf.account(account_master, name="test1") - wallet.import_key(test1) - assert(not test1.error) - - global test2 - test2 = eosf.account(account_master, name="test2") - wallet.import_key(test2) - assert(not test2.error) - - global test3 - test3 = eosf.account(account_master, name="test3") - wallet.import_key(test3) - assert(not test3.error) - - contract_deploy = eosf.account(account_master, name="token.ore") - wallet.import_key(contract_deploy) - assert(not contract_deploy.error) - - contract_eosio_bios = eosf.Contract( - account_master, "eosio.bios").deploy() - assert(not contract_eosio_bios.error) - - global token_contract - token_contract = eosf.Contract(contract_deploy, contractPath+"/ore.standard_token") - assert(not token_contract.error) - - deployment = token_contract.deploy() - assert(not deployment.error) - - - def setUp(self): - pass - - - def test_01(self): - - cprint(""" -TOKEN CREATE TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("ORE create") - """, 'magenta') - self.assertTrue(token_contract.push_action( - "create", - '{"issuer":"' - + 'test1' - + '", "maximum_supply":"100000000.0000 ORERERERERE"}').error) - - cprint(""" -Action contract.push_action("ORE create") - """, 'magenta') - self.assertTrue(token_contract.push_action( - "create", - '{"issuer":"' - + 'test1' - + '", "maximum_supply":"-100000000.0000 OREE"}').error) - - cprint(""" -Action contract.push_action("ORE create") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "create", - '{"issuer":"' - + 'test1' - + '", "maximum_supply":"100000000.0000 ORE"}').error) - - cprint(""" -Action contract.push_action("ORE create") - """, 'magenta') - self.assertTrue(token_contract.push_action( - "create", - '{"issuer":"' - + 'test1' - + '", "maximum_supply":"100000000.0000 ORE"}').error) - - cprint(""" -Action contract.push_action("ORE transfer") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "issue", - '{"to":"test1", "quantity":"10000000.0000 ORE", "memo": "ORE token issued"}', - test1).error) - - cprint(""" -Action contract.push_action("ORE transfer") - """, 'magenta') - self.assertTrue(token_contract.push_action( - "issue", - '{"to":"test1", "quantity":"100000000000000.0000 ORE", "memo": "ORE token issued"}', - test1).error) - - cprint(""" -Action contract.push_action("ORE transfer") - """, 'magenta') - self.assertTrue(token_contract.push_action( - "issue", - '{"to":"test2", "quantity":"1000000.0000 ORE", "memo": "ORE token issued"}', - test2).error) - - def test_02(self): - - cprint(""" -TOKEN TRANSFER TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("ORE transfer") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "transfer", - '{"from":"test1", "to":"test2", "quantity":"100.0000 ORE", "memo":"transfer1"}', test1).error) - - cprint(""" -Action contract.push_action("ORE transfer") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "transfer", - '{"from":"test2", "to":"test3", "quantity":"50.0000 ORE", "memo":"transfer1"}', test2).error) - - cprint(""" -Action contract.push_action("ORE transfer") - """, 'magenta') - self.assertTrue(token_contract.push_action( - "transfer", - '{"from":"test2", "to":"test3", "quantity":"60.0000 ORE", "memo":"transfer1"}', test2).error) - - def test_03(self): - - cprint(""" -TOKEN APPROVAL TESTS STARTED - """, 'yellow') - - cprint(""" -Action contract.push_action("ORE create") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "approve", - '{"from":"test1", "to":"test3", "quantity":"100.0000 ORE", "memo":"transfer1"}', test1).error) - - cprint(""" -Action contract.push_action("ORE create") - """, 'magenta') - self.assertTrue(token_contract.push_action( - "approve", - '{"from":"test2", "to":"test3", "quantity":"100.0000 ORE", "memo":"transfer1"}', test1).error) - - def test_04(self): - - cprint(""" -Action contract.push_action("ORE create") - """, 'magenta') - self.assertFalse(token_contract.push_action( - "transferfrom", - '{"sender":"test3", "from":"test1", "to":"test2", "quantity":"100.0000 ORE"}', test3).error) - - cprint(""" -Action contract.push_action("ORE create") - """, 'magenta') - self.assertTrue(token_contract.push_action( - "transferfrom", - '{"sender":"test3", "from":"test1", "to":"test2", "quantity":"100.0000 ORE"}', test3).error) - - def test_05(self): - - cprint(""" -TOKEN TABLE TESTS STARTED - """, 'yellow') - - cprint(""" -Assign t1 = token_contract.table("rights.ore", "rights.ore") - """, 'green') - t1 = token_contract.table("accounts", "test1") - - cprint(""" -Assign t1 = token_contract.table("rights.ore", "rights.ore") - """, 'green') - t2 = token_contract.table("accounts", "test2") - - cprint(""" -Assign t1 = token_contract.table("rights.ore", "rights.ore") - """, 'green') - t2 = token_contract.table("accounts", "test3") - - cprint(""" -Assign t1 = token_contract.table("rights.ore", "rights.ore") - """, 'green') - t3 = token_contract.table("allowances", "test1") - - - def tearDown(self): - pass - - - @classmethod - def tearDownClass(cls): - pass - - -if __name__ == "__main__": - unittest.main() \ No newline at end of file diff --git a/tests/usage_log.py b/tests/usage_log.py new file mode 100644 index 0000000..35f0333 --- /dev/null +++ b/tests/usage_log.py @@ -0,0 +1,116 @@ +import unittest +from eosfactory.eosf import * + +verbosity([Verbosity.INFO, Verbosity.OUT, Verbosity.TRACE, Verbosity.DEBUG]) + +class Test(unittest.TestCase): + + def run(self, result=None): + super().run(result) + + + @classmethod + def setUpClass(cls): + SCENARIO(''' + Create a contract from template, then build and deploy it. + ''') + reset() + create_wallet() + create_master_account("master") + + COMMENT(''' + Create test accounts: + ''') + create_account("app", master) + + + def setUp(self): + pass + + + def test_01(self): + COMMENT(''' + Create, build and deploy the contracts: + ''') + + create_account("usage", master) + usage_contract = Contract(usage, "/root/ore-protocol/contracts/ore.usage_log") + usage_contract.build() + usage_contract.deploy() + + def test_02(self): + COMMENT(''' + Create Log: + ''') + + usage.push_action( + "createlog", + { + "instrument_id": 1, + "right_name": "right1", + "token_hash": "tokenhash1", + "timestamp": 100 + + }, + permission=(app, Permission.ACTIVE)) + + usage.push_action( + "createlog", + { + "instrument_id": 2, + "right_name": "right2", + "token_hash": "tokenhash2", + "timestamp": 100 + + }, + permission=(app, Permission.ACTIVE)) + + def test_03(self): + COMMENT(''' + Delete Log: + ''') + usage.push_action( + "deletelog", + { + "instrument_id": 2, + "token_hash": "tokenhash2" + + }, + permission=(app, Permission.ACTIVE)) + + with self.assertRaises(Error): #No log exist for the given pair or right and instrument + usage.push_action( + "deletelog", + { + "instrument_id": 2, + "token_hash": "tokenhash2" + + }, + permission=(app, Permission.ACTIVE)) + + def test_04(self): + COMMENT(''' + Update Count: + ''') + + usage.push_action( + "updatecount", + { + "instrument_id": 1, + "right_name": "right1", + "cpu": "1.0000 CPU" + + }, + permission=(app, Permission.ACTIVE)) + + def tearDown(self): + pass + + + @classmethod + def tearDownClass(cls): + stop() + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/usagelogtest.py b/tests/usagelogtest.py deleted file mode 100755 index c8c053a..0000000 --- a/tests/usagelogtest.py +++ /dev/null @@ -1,146 +0,0 @@ -# python3 ./tests/mint.py - -import time -import setup -import eosf -import node -import unittest -from termcolor import cprint - -setup.set_verbose(True) -setup.set_json(False) -setup.use_keosd(False) -#setup.set_command_line_mode(True) - -class Test1(unittest.TestCase): - - def run(self, result=None): - """ Stop after first error """ - if not result.failures: - super().run(result) - - - @classmethod - def setUpClass(cls): - global contractPath - # set this variable to the local path for the contracts folder - contractPath = "/Users/basar/Workspace/ore-protocol/contracts" - - testnet = node.reset() - assert(not testnet.error) - - wallet = eosf.Wallet() - assert(not wallet.error) - - global account_master - account_master = eosf.AccountMaster() - wallet.import_key(account_master) - assert(not account_master.error) - - usage_deploy = eosf.account(account_master, name="usagelog") - wallet.import_key(usage_deploy) - assert(not usage_deploy.error) - - contract_eosio_bios = eosf.Contract( - account_master, "eosio.bios").deploy() - assert(not contract_eosio_bios.error) - - global usagelog_ore - usagelog_ore = eosf.Contract(usage_deploy, contractPath+"/ore.usage_log") - assert(not usagelog_ore.error) - - - deployment = usagelog_ore.deploy() - assert(not deployment.error) - - - def setUp(self): - pass - - - def test_01(self): - - cprint(""" -USAGE LOG TESTS STARTED - """, 'yellow') - - cprint(""" -Action usagelog_ore.push_action("LOG CREATE") - """, 'magenta') - self.assertFalse(usagelog_ore.push_action( - "createlog", - '{"instrument_id": 0, "token_hash":"tokenhash", "timestamp":12345678 }').error) - cprint(""" -Action usagelog_ore.push_action("LOG CREATE") - """, 'magenta') - self.assertFalse(usagelog_ore.push_action( - "createlog", - '{"instrument_id": 1, "token_hash":"tokenhash", "timestamp":12345678 }').error) - cprint(""" -Action usagelog_ore.push_action("LOG CREATE") - """, 'magenta') - self.assertFalse(usagelog_ore.push_action( - "createlog", - '{"instrument_id": 2, "token_hash":"tokenhash", "timestamp":12345678 }').error) - cprint(""" -Action usagelog_ore.push_action("LOG CREATE") - """, 'magenta') - self.assertTrue(usagelog_ore.push_action( - "createlog", - '{"instrument_id": 2, "token_hash":"tokenhash", "timestamp":12345678 }').error) - - cprint(""" -Assign t1 = usagelog_ore.table("logs", "usagelog") - """, 'green') - t1 = usagelog_ore.table("logs", "usagelog") - - def test_02(self): - - cprint(""" -USAGE COUNT TESTS STARTED - """, 'yellow') - - cprint(""" -Action usagelog_ore.push_action("LOG CREATE") - """, 'magenta') - self.assertFalse(usagelog_ore.push_action( - "updatecount", - '{"instrument_id": 0, "right_name":"rightname", "cpu":"10.0000 CPU" }').error) - - time.sleep(1) - - cprint(""" -Action usagelog_ore.push_action("LOG CREATE") - """, 'magenta') - self.assertFalse(usagelog_ore.push_action( - "updatecount", - '{"instrument_id": 0, "right_name":"rightname", "cpu":"10.0000 CPU" }').error) - - time.sleep(1) - - cprint(""" -Action usagelog_ore.push_action("LOG CREATE") - """, 'magenta') - self.assertFalse(usagelog_ore.push_action( - "updatecount", - '{"instrument_id": 0, "right_name":"rightname", "cpu":"10.0000 CPU" }').error) - - time.sleep(1) - - cprint(""" -Assign t1 = usagelog_ore.table("counts", "usagelog") - """, 'green') - t1 = usagelog_ore.table("counts", "0") - - - def tearDown(self): - pass - - - @classmethod - def tearDownClass(cls): - pass - - -if __name__ == "__main__": - unittest.main() \ No newline at end of file